blob: 393569a76ae878361221c7678746ff5ef0040cc5 [file] [log] [blame]
<html>
<head>
<script src="resources/dump-list.js"></script>
<script>
function test()
{
if (window.testRunner)
testRunner.dumpAsText();
var list1 = document.getElementById("list1");
document.getElementById("console1").innerHTML = dumpList(list1);
var list2 = document.getElementById("list2");
document.getElementById("console2").innerHTML = dumpList(list2);
var list3 = document.getElementById("list3");
document.getElementById("console3").innerHTML = dumpList(list3);
var list4 = document.getElementById("list4");
document.getElementById("console4").innerHTML = dumpList(list4);
var list5 = document.getElementById("list5");
document.getElementById("console5").innerHTML = dumpList(list5);
var list6 = document.getElementById("list6");
document.getElementById("console6").innerHTML = "Value of start attribute of the list is : " + list6.start;
// Don't show the actual lists as they are useless in the text-only mode.
list1.parentNode.removeChild(list1);
list2.parentNode.removeChild(list2);
list3.parentNode.removeChild(list3);
list4.parentNode.removeChild(list4);
list5.parentNode.removeChild(list5);
list6.parentNode.removeChild(list6);
}
</script>
</head>
<body onload="test()">
<p>This tests that reversed lists render properly.</p>
<ol id="list1" reversed>
<li>Five</li>
<li>Four</li>
<div style="display: list-item">Three</div>
<li>Two</li>
<li>One</li>
</ol>
<p id="console1"></p>
<p>This tests that reversed lists with a custom start value render properly.</p>
<ol id="list2" reversed="reversed" start="10">
<li>Ten</li>
<li>Nine</li>
<li>Eight</li>
<li>Seven</li>
<li>Six</li>
</ol>
<p id="console2"></p>
<p>This tests that reversed lists with explicit item values render properly.</p>
<ol id="list3" reversed>
<li>Five</li>
<li>Four</li>
<li value="2">Two</li>
<li>One</li>
<li>Zero</li>
</ol>
<p id="console3"></p>
<p>This tests that reversed lists with a custom start value and explicit item values render properly.</p>
<ol id="list4" reversed start="10">
<li>Ten</li>
<li>Nine</li>
<li value="3">Three</li>
<li>Two</li>
<li>One</li>
<li value="3">Three</li>
<li>Two</li>
<li>One</li>
</ol>
<p id="console4"></p>
<p>This tests that reversed lists with a negative start value render properly.</p>
<ol id="list5" reversed="reversed" start="-5">
<li>Minus Five</li>
<li>Minus Six</li>
<li>Minus Seven</li>
<li>Minus Eight</li>
<li>Minus Nine</li>
</ol>
<p id="console5"></p>
<p>This tests that reversed lists have a start attribute of 1 when no start value is specified.</p>
<ol id="list6" reversed>
<li>Five</li>
<li>Four</li>
<li>Three</li>
<li>Two</li>
<li>One</li>
</ol>
<p id="console6"></p>
</body>
</html>