blob: 21411e9274d404c415069c7f5f4db38502a651cf [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=800">
<style>
body, html {
overflow: hidden;
}
html {
font-size: small;
}
.inline {
display: inline;
font-weight: normal;
font-style: normal;
background-color: green;
}
i.inline {
background-color: blue;
}
b {
font-weight: normal;
font-style: normal;
background-color: purple;
}
</style>
<script src="resources/autosizingTest.js"></script>
</head>
<body>
This test passes if all lines have the same width.<br/>
<table>
<tr>
<td>a</td>
<td>
<div class="inline">
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
</div>
<i class="inline">AutosizeAutosizeAutosizeAutosize</i><br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
<b><b><b><i class="inline"><b><b><b>AutosizeAutosizeAutosizeAutosize</b></b></b></i></b></b></b><br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize<br/>
AutosizeAutosizeAutosizeAutosize
</td>
</tr>
</table>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var pass = true;
var inlines = document.getElementsByClassName('inline');
var referenceWidth = inlines[0].offsetWidth;
for (var i = 1; i < inlines.length; i++) {
if (inlines[i].offsetWidth != referenceWidth)
pass = false;
}
if (pass)
document.body.innerText = 'PASS: All inlines have the same width.';
else
document.body.innerText = 'FAIL: All inlines do not have the same width.';
</script>
</body>
</html>