summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/table/switch-table-layout.html
blob: 8b0a7b1c38384f86798c1d24c2c6c98d1d551f2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE HTML>
<html>
<head>
<style>
#container {
    width: 1px;
}
#table {
    width: 200px;
    table-layout: fixed;
}
#table tr td {
    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 data-expected-width="100"></td><td data-expected-width="100"></td></tr>
        </table>
    </div>
    <div id="test-output"></div>
</body>
<script>
document.body.offsetTop;

var container = document.getElementById('container');
container.style.setProperty('width', '500px');

var table = document.getElementById('table');
table.style.setProperty('table-layout', 'auto');
table.style.setProperty('width', 'auto');

window.checkLayout("#table tr td", document.getElementById("test-output"));
</script>
</html>