summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html')
-rw-r--r--testing/web-platform/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html23
1 files changed, 23 insertions, 0 deletions
diff --git a/testing/web-platform/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html b/testing/web-platform/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html
new file mode 100644
index 0000000000..9f9dfbc938
--- /dev/null
+++ b/testing/web-platform/tests/selection/crashtests/selectall-and-find-svg-text-on-selectstart.html
@@ -0,0 +1,23 @@
+<!doctype html>
+<html class="reftest-wait">
+<head>
+<meta charset="utf-8">
+<script>
+addEventListener("DOMContentLoaded", () => {
+ let i = 5;
+ document.addEventListener("selectstart", () => {
+ window.find("AAA");
+ document.querySelector("li").before(document.querySelector("text"));
+ if (!(--i)) {
+ document.documentElement.removeAttribute("class");
+ }
+ });
+ document.execCommand("selectAll");
+}, {once: true});
+</script>
+<body>
+<svg>
+<text>AAA</text>
+<li>
+</li></svg></body>
+</html>