Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / lists / ol-nested-items-dynamic-remove.html
blobcf48c839193265a341a1ee346dcab1bac46f275f
1 <html>
2 <head>
3 <script src="resources/dump-list.js"></script>
4 <script>
5 function test()
7 if (window.testRunner)
8 testRunner.dumpAsText();
10 var list = document.getElementById("list");
11 list.offsetTop; // Force a relayout.
13 var b = document.getElementsByTagName("b")[0];
14 list.removeChild(b);
16 var div = document.getElementById("nested");
17 var items = div.children.length;
18 for (var i = 0; i < items; ++i)
19 div.removeChild(div.firstElementChild);
21 list.removeChild(document.getElementById("item"));
23 document.getElementById("console").innerHTML = dumpList(list);
25 // Don't show the actual list as it is useless in the text-only mode.
26 list.parentNode.removeChild(list);
28 </script>
29 </head>
30 <body onload="test()">
31 <p>This tests that list item markers are updated when removing existing items that are not direct children of the list element.</p>
32 <ol id="list">
33 <li>One</li>
34 <li>Two</li>
35 <b><li>Foo</li></b>
36 <li>Three</li>
37 <li>Four</li>
38 <li>Five</li>
39 <div id="nested">
40 <li>Foo</li>
41 <li>Bar</li>
42 <li>Baz</li>
43 </div>
44 <li>Six</li>
45 <div id="item" style="display: list-item">Foo</div>
46 <li>Seven</li>
47 </ol>
49 <div id="console"></div>
50 </body>
51 </html>