blob: 04c3af3884c1767864a85392a563e64c1dfbb471 [file] [log] [blame]
<!DOCTYPE HTML>
<html>
<head>
<style>
#container {
width: 1px;
}
#table {
width: 200px;
table-layout: fixed;
}
.wide-cell {
width: 100px;
padding: 0;
}
</style>
<script src="../../resources/check-layout.js"></script>
</head>
<body>
This test verifies table cell width is correctly updated after a table-layout change.
<div id="container">
<table id="table">
<tr><td class="wide-cell" data-expected-width="100"></td><td class="wide-cell" data-expected-width="100"></td></tr>
</table>
</div>
<div id="test-output"></div>
</body>
<script>
document.body.offsetTop;
var table = document.getElementById("table");
var row = table.insertRow();
row.insertCell().setAttribute("data-expected-width", "100")
row.insertCell().setAttribute("data-expected-width", "100")
document.body.offsetTop;
var container = document.getElementById("container");
container.style.setProperty("width", "500px");
table.style.setProperty("table-layout", "auto");
table.style.setProperty("width", "auto");
window.checkLayout("#table tr td", document.getElementById("test-output"));
</script>
</html>