Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / lists / ol-nested-items-dynamic-insert.html
blobd07a2dfdcda666e90d8b33e432d1bbfda9020cf1
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 p = document.getElementById("nested");
15 var li1 = document.createElement("li");
16 li1.innerText = "Eight";
18 var li2 = document.createElement("li");
19 li2.innerText = "Seven";
21 var item3 = document.createElement("div");
22 item3.innerText = "Nine";
23 item3.style.display = "list-item";
25 p.appendChild(li1);
26 p.insertBefore(li2, li1);
27 p.appendChild(item3);
29 document.getElementById("console").innerHTML = dumpList(list);
31 // Don't show the actual list as it is useless in the text-only mode.
32 list.parentNode.removeChild(list);
34 </script>
35 </head>
36 <body onload="test()">
37 <p>This tests that list item markers are updated when adding new items as indirect children of the list element.</p>
38 <ol id="list">
39 <li>One</li>
40 <li>Two</li>
41 <div><li>Three</li></div>
42 <li>Four</li>
43 <li>Five</li>
44 <li>Six</li>
45 <p id="nested"></p>
46 <li>Ten</li>
47 <li>Eleven</li>
48 </ol>
50 <div id="console"></div>
51 </body>
52 </html>