30 lines
854 B
HTML
30 lines
854 B
HTML
<html>
|
|
<head>
|
|
<script>
|
|
window.onload = function() {
|
|
if (window.testRunner)
|
|
window.testRunner.dumpAsText();
|
|
|
|
var cell = document.getElementById("cell");
|
|
var text = cell.firstElementChild;
|
|
var wdiff = cell.offsetWidth - text.offsetWidth - (parseInt(window.getComputedStyle(cell).getPropertyValue('padding-right')) +
|
|
parseInt(window.getComputedStyle(cell).getPropertyValue('padding-left')));
|
|
if (wdiff > 0)
|
|
text.innerText = "PASS";
|
|
}
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<div style="float: left;">
|
|
<table style="margin: 1px">
|
|
<tr>
|
|
<td></td>
|
|
<td id="cell" style="background-color: green; width: 100%; height: 30px">
|
|
<span>FAIL</span>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div style="clear: left;">The green box should be the full width of the page.</div>
|
|
</body>
|
|
</html> |