Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / lists / ol-nested-list-dynamic-insert.html
blob6a97e2abe1b04f07790f65008043863c9086fd64
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 nestedList = document.getElementById("nested-list");
15 var li2 = document.createElement("li");
16 li2.innerText = "Twenty five";
17 li2.value = "25";
18 var li1 = document.createElement("li");
19 li1.innerText = "One";
20 var li3 = document.createElement("li");
21 li3.innerText = "Twenty six";
23 nestedList.appendChild(li2);
24 nestedList.insertBefore(li1, li2);
25 nestedList.appendChild(li3);
27 document.getElementById("console").innerHTML = dumpList(list);
29 // Don't show the actual list as it is useless in the text-only mode.
30 list.parentNode.removeChild(list);
32 </script>
33 </head>
34 <body onload="test()">
35 <p>This tests that list item markers do not change when adding new items to a nested list.</p>
36 <ol id="list">
37 <li>One</li>
38 <li>Two</li>
39 <li>Three</li>
40 <li>Four</li>
41 <li>Five <ol id="nested-list"></ol></li>
42 <li>Six</li>
43 <li>Seven</li>
44 </ol>
46 <div id="console"></div>
47 </body>
48 </html>