f2513fe187bcac25f03e521cdb5833745e3244af
[WebKit-https.git] / LayoutTests / fast / table / fixed-table-layout / fixed-layout-column-colspan-wrong-size.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <style>
5 table {
6     width: 330px;
7     table-layout: fixed;
8     border-spacing: 0px;
9 }
10 td {
11     padding: 0px;
12 }
13 </style>
14 <script src="../../js/resources/js-test-pre.js"></script>
15 <script>
16 if (window.testRunner)
17     testRunner.dumpAsText();
18
19 function test()
20 {
21     description("Bug 20213: colspan in table-layout:fixed does not add up widths properly");
22
23     testCell = document.getElementById("tdColspan");
24     testTable = document.getElementsByTagName("table")[0];
25     shouldBe("window.getComputedStyle(testCell).width", "'320px'");
26     shouldBe("window.getComputedStyle(testTable).width", "'330px'");
27     isSuccessfullyParsed();
28 }
29
30 window.addEventListener("load", test);
31 </script>
32 </head>
33 <body>
34     <table>
35         <colgroup>
36             <col width="10">
37             <col width="300">
38             <col width="10">
39             <col width="10">
40         </colgroup>
41         <tbody>
42             <tr>
43             <td></td>
44             <td colspan="3" id="tdColspan"></td>
45             </tr>
46         </tbody>
47     </table>
48     <div id="description"></div>
49     <div id="console"></div>
50 </body>
51 </html>