blob: e68a1b130cf4384d74b10cae5043ef374af09811 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
col {
width: 200px;
}
td {
background-color: #66f;
height: 25px;
}
</style>
<script src="../../../resources/js-test-pre.js"></script>
<script>
function runTest() {
description('Tests that the width of table cell changes on changing the colgroup width to new width which is less than its originally defined width. New width should be 100');
setTimeout(function() {
var col = document.getElementById('thecol');
col.style.width="100px";
shouldBe("document.getElementById('colWidth').offsetWidth","100");
finishJSTest();
}, 0);
}
var jsTestIsAsync = true;
</script>
</head>
<body onload="runTest()">
<table>
<colgroup>
<col id="thecol">
</colgroup>
<tbody>
<tr>
<td id="colWidth"></td>
</tr>
</tbody>
</table>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>