3 <script src=
"resources/dump-list.js"></script>
8 testRunner
.dumpAsText();
10 var list1
= document
.getElementById("list1");
11 list1
.offsetTop
; // Force a relayout.
12 list1
.reversed
= true;
13 document
.getElementById("console1").innerHTML
= dumpList(list1
);
15 var list2
= document
.getElementById("list2");
16 list2
.setAttribute("reversed", "");
17 document
.getElementById("console2").innerHTML
= dumpList(list2
);
19 var list3
= document
.getElementById("list3");
20 var li1
= document
.createElement("li");
21 li1
.innerHTML
= "Four";
22 list3
.querySelector("p").appendChild(li1
);
23 var li2
= document
.createElement("li");
24 li2
.innerHTML
= "One";
25 list3
.appendChild(li2
);
26 document
.getElementById("console3").innerHTML
= dumpList(list3
);
28 var list4
= document
.getElementById("list4");
29 var div
= list4
.querySelector("div");
30 div
.removeChild(div
.firstElementChild
);
31 list4
.removeChild(list4
.lastElementChild
);
32 document
.getElementById("console4").innerHTML
= dumpList(list4
);
34 // Don't show the actual lists as they are useless in the text-only mode.
35 list1
.parentNode
.removeChild(list1
);
36 list2
.parentNode
.removeChild(list2
);
37 list3
.parentNode
.removeChild(list3
);
38 list4
.parentNode
.removeChild(list4
);
42 <body onload=
"test()">
43 <p>This tests that changing the
"reversed" property updates markers.
</p>
53 <p>This tests that changing the
"reversed" attribute updates markers.
</p>
63 <p>This tests that adding new items to a reversed list updates markers.
</p>
64 <ol id=
"list3" reversed
>
74 <p>This tests that removing existing tems from a reversed list updates markers.
</p>
75 <ol id=
"list4" reversed
>
79 <div><li>Foo
</li></div>