diff options
Diffstat (limited to 'testing/web-platform/tests/editing/crashtests/inserthorizontalrule-with-selecting-text-in-document-element.html')
-rw-r--r-- | testing/web-platform/tests/editing/crashtests/inserthorizontalrule-with-selecting-text-in-document-element.html | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testing/web-platform/tests/editing/crashtests/inserthorizontalrule-with-selecting-text-in-document-element.html b/testing/web-platform/tests/editing/crashtests/inserthorizontalrule-with-selecting-text-in-document-element.html new file mode 100644 index 0000000000..c46b0359e8 --- /dev/null +++ b/testing/web-platform/tests/editing/crashtests/inserthorizontalrule-with-selecting-text-in-document-element.html @@ -0,0 +1,18 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<script> +document.addEventListener("DOMContentLoaded", () => { + const text = document.createTextNode("abc"); + document.documentElement.appendChild(text); + const range = new Range(); + range.selectNodeContents(text); + document.documentElement.contentEditable = "true"; + document.execCommand("insertUnorderedList"); + getSelection().addRange(range); + document.execCommand("insertHorizontalRule"); +}); +</script> +</head> +</html> |