Bug 1772588 [wpt PR 34302] - [wpt] Add test for block-in-inline offsetParent., a...
[gecko.git] / editor / libeditor / tests / file_select_all_without_body.html
blob06b7e6685ca841e68aa466ee49a9072215ed64b9
1 <html>
2 <head>
3 <script type="text/javascript">
5 function is(aLeft, aRight, aMessage) {
6 window.opener.SimpleTest.is(aLeft, aRight, aMessage);
9 function unload() {
10 window.opener.SimpleTest.finish();
13 function boom() {
14 var root = document.documentElement;
15 while (root.firstChild) {
16 root.firstChild.remove();
18 root.appendChild(document.createTextNode("Mozilla"));
19 root.focus();
20 let cespan = document.createElementNS("http://www.w3.org/1999/xhtml", "span");
21 cespan.setAttributeNS(null, "contenteditable", "true");
22 root.appendChild(cespan);
23 try {
24 document.execCommand("selectAll", false, null);
25 } catch (e) { }
27 is(window.getSelection().toString(), "Mozilla",
28 "The nodes are not selected");
30 window.close();
33 window.opener.SimpleTest.waitForFocus(boom, window);
35 </script></head>
37 <body onunload="unload();"></body>
38 </html>