upload webkit/tizen 2.0_beta source.
[framework/web/webkit-efl.git] / LayoutTests / fast / lists / ol-nested-items-dynamic-insert.html
1 <html>
2     <head>
3         <script src="resources/dump-list.js"></script>
4         <script>
5             function test()
6             {
7                 if (window.layoutTestController)
8                     layoutTestController.dumpAsText();
9
10                 var list = document.getElementById("list");
11                 list.offsetTop; // Force a relayout.
12
13                 var p = document.getElementById("nested");
14
15                 var li1 = document.createElement("li");
16                 li1.innerText = "Eight";
17
18                 var li2 = document.createElement("li");
19                 li2.innerText = "Seven";
20
21                 var item3 = document.createElement("div");
22                 item3.innerText = "Nine";
23                 item3.style.display = "list-item";
24
25                 p.appendChild(li1);
26                 p.insertBefore(li2, li1);
27                 p.appendChild(item3);
28
29                 document.getElementById("console").innerHTML = dumpList(list);
30
31                 // Don't show the actual list as it is useless in the text-only mode.
32                 list.parentNode.removeChild(list);
33             }
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>
49
50         <div id="console"></div>
51     </body>
52 </html>