4 <script src=
"../../resources/js-test.js"></script>
6 <body onload=
"runTest();">
7 <div id=
"console"></div>
8 <div contenteditable=
"true" id=
"root"><b>one
</b><div><b>two
</b></div><div><b>three
</b></div><div><br></div></div>
10 var root
= document
.getElementById("root");
11 function toggleList() {
12 var temporaryBlock
= document
.createElement('div');
13 temporaryBlock
.style
.cssText
= "height: 0";
14 temporaryBlock
.appendChild(document
.createTextNode('x'));
15 root
.insertBefore(temporaryBlock
, root
.firstChild
);
16 document
.execCommand('insertUnorderedList');
17 root
.removeChild(temporaryBlock
);
21 if (window
.testRunner
)
22 testRunner
.dumpAsText();
24 description("This test verifies insertUnorderedList can properly undo its own DOM manipulation.");
26 document
.execCommand("SelectAll");
31 shouldBeTrue("document.getElementsByTagName('ul').length == 0");
33 if (window
.testRunner
)
34 root
.parentNode
.removeChild(root
);