diff options
Diffstat (limited to 'testing/web-platform/tests/selection/crashtests')
2 files changed, 42 insertions, 0 deletions
diff --git a/testing/web-platform/tests/selection/crashtests/selection-details-editor-ui.html b/testing/web-platform/tests/selection/crashtests/selection-details-editor-ui.html new file mode 100644 index 0000000000..444306207a --- /dev/null +++ b/testing/web-platform/tests/selection/crashtests/selection-details-editor-ui.html @@ -0,0 +1,19 @@ +<!doctype html> +<meta charset=utf-8> +<style> +*:nth-child(odd) { + display: table-header-group; +} +</style> +<script> +document.addEventListener("DOMContentLoaded", () => { + document.execCommand("enableObjectResizing", false) + document.addEventListener("selectionchange", () => { + document.execCommand("insertImage", false, "x") + document.execCommand("selectAll", false) + }, { once: true }); + document.getSelection().collapse(a) +}) +</script> +<details open="" contenteditable="true"> +<details id="a"> diff --git a/testing/web-platform/tests/selection/crashtests/selection-modify-line-next-to-input-and-make-it-invisible.html b/testing/web-platform/tests/selection/crashtests/selection-modify-line-next-to-input-and-make-it-invisible.html new file mode 100644 index 0000000000..09e018f581 --- /dev/null +++ b/testing/web-platform/tests/selection/crashtests/selection-modify-line-next-to-input-and-make-it-invisible.html @@ -0,0 +1,23 @@ +<!doctype html> +<html> +<head> +<meta charset="utf-8"> +<script> +document.addEventListener("DOMContentLoaded", () => { + getSelection().addRange(document.createRange()); + const range = document.createRange(); + range.selectNode(document.querySelector("meter")); + getSelection().addRange(range); + getSelection().modify('move', 'left', 'line'); + document.querySelector("input").style.display = "none"; + getSelection().modify('move', 'left', 'lineboundary'); +}) +</script> +</head> +<body> +<input> +<div contenteditable> +<meter> +</div> +</body> +</html> |