summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/editing/crashtests/indent-outdent-after-closing-editable-dialog-element.html
diff options
context:
space:
mode:
Diffstat (limited to 'testing/web-platform/tests/editing/crashtests/indent-outdent-after-closing-editable-dialog-element.html')
-rw-r--r--testing/web-platform/tests/editing/crashtests/indent-outdent-after-closing-editable-dialog-element.html31
1 files changed, 31 insertions, 0 deletions
diff --git a/testing/web-platform/tests/editing/crashtests/indent-outdent-after-closing-editable-dialog-element.html b/testing/web-platform/tests/editing/crashtests/indent-outdent-after-closing-editable-dialog-element.html
new file mode 100644
index 0000000000..7f73de048d
--- /dev/null
+++ b/testing/web-platform/tests/editing/crashtests/indent-outdent-after-closing-editable-dialog-element.html
@@ -0,0 +1,31 @@
+<html class="reftest-wait">
+<script>
+var eventCount = 0;
+document.addEventListener("DOMContentLoaded", () => {
+ const dialog = document.querySelector("dialog");
+ const object = document.createElement("object");
+ object.addEventListener("DOMSubtreeModified", () => {
+ dialog.show();
+ dialog.focus();
+ document.execCommand("selectAll");
+ dialog.close();
+ setTimeout(() => {
+ document.execCommand("selectAll");
+ document.execCommand("strikeThrough");
+ document.execCommand("indent");
+ document.execCommand("outdent");
+ eventCount--;
+ if (!eventCount) {
+ document.documentElement.removeAttribute("class");
+ }
+ });
+ eventCount++;
+ });
+ object.setAttribute("role", "x"); // Run DOMSubtreeModified
+ object.setAttribute("role", "y"); // Run DOMSubtreeModified
+ document.execCommand("forwardDelete");
+ document.execCommand("justifyRight");
+})
+</script>
+<dialog id="a" contenteditable="true">a</dialog>
+</html> \ No newline at end of file