blob: d8114936ad611853aa7211931fc095363a78d24f [file] [log] [blame]
<head>
<style>
ol { margin: 0px; }
</style>
<script>
function run()
{
// Check if the two divs aren't overflowed by checking they have
// the same height.
var ref = document.getElementById("ref");
var test = document.getElementById("test");
var result = document.getElementById("result");
if (ref.scrollHeight == test.scrollHeight)
result.appendChild(document.createTextNode("SUCCESS"));
else
result.appendChild(document.createTextNode("FAILED"));
}
if (window.testRunner)
testRunner.dumpAsText();
</script>
</head>
<body onload="run();">
These two lines should look same as spaces after a list marker should
be ignored. There are 18 characters in each line. As they are 20px
width, the total width should be 360px + a few pixels for table.
If the space character after the list marker in "test" isn't ignored,
the number of characters become 19 and 370px div will be overflowed.
Note that this test requires Ahem font.
<div style="height: 20px; overflow-y: scroll;" id="ref">
<table style="width: 370px; font: 20px Ahem;">
<tr>
<td><ol><li>XpX XpX</ol></td>
<td><ol><li>XpX XpX</ol></td>
</tr>
</table>
</div>
<div style="height: 20px; overflow-y: scroll;" id="test">
<table style="width: 370px; font: 20px Ahem;">
<tr>
<td><ol><li> XpX XpX</ol></td>
<td><ol><li>XpX XpX</ol></td>
</tr>
</table>
</div>
<div id="result">
</div>
</body>