-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
part 30: Port editor/libeditor/crashtests/716456-1.html to WPT
Differential Revision: https://phabricator.services.mozilla.com/D129586 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=1725850 gecko-commit: c974b2b8004c393c9195ab3837f2e84f716fba4e gecko-reviewers: saschanaz
- Loading branch information
1 parent
bccb18e
commit 0b61dc7
Showing
2 changed files
with
28 additions
and
0 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
editing/crashtests/inserthtml-after-temporarily-removing-document-element.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html class="test-wait"> | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Testcase for bug 716456 of Mozilla</title> | ||
<script> | ||
function boom() { | ||
const div = document.querySelector("div"); | ||
div.contentEditable = "true"; | ||
div.focus(); | ||
|
||
const root = document.documentElement; | ||
document.removeChild(root); | ||
document.appendChild(root); | ||
|
||
setTimeout(() => { | ||
getSelection().collapse(div, 0); | ||
document.execCommand("inserthtml", false, "a"); | ||
setTimeout(() => { | ||
document.documentElement.removeAttribute("class"); | ||
}, 0); | ||
}, 0); | ||
} | ||
</script> | ||
</head> | ||
<body onload="boom();"><div></div></body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters