Change fast/s* and fast/t* files to use pre and post js files in LayoutTests/resources.
[WebKit-https.git] / LayoutTests / fast / table / resize-table-binding-cell.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <style>
5     td
6     {
7         width: 50px;
8         height: 40px;
9     }
10     table.big td.binding
11     {
12         height: 80px;
13     }
14
15     table td.filler
16     {
17         height: auto;
18     }
19     </style>
20     <script src="../../resources/js-test-pre.js"></script>
21 </head>
22 <body>
23     <div style="height: 300px">
24         <table border="1" style="height: 100%">
25             <tr id="firstRow">
26             <td class="binding"></td>
27             <td></td>
28             </tr>
29             <tr>
30             <td class="filler" ></td>
31             <td class="filler" ></td>
32             </tr>
33         </table>
34     </div>
35     <script>
36     var bigRows = false;
37
38     function toggleBigRows()
39     {
40         var table = document.querySelector("table")
41         bigRows = !bigRows;
42         if (bigRows)
43             table.classList.add("big");
44         else
45             table.classList.remove("big");
46     }
47
48     description("Regression(99212): table rows get incorrect height after changing some cells' height<br>https://bugs.webkit.org/show_bug.cgi?id=74303");
49     firstRow = document.getElementById("firstRow");
50     // Original value.
51     shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'44px'");
52
53     toggleBigRows();
54     shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'84px'");
55     toggleBigRows();
56     shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'44px'");
57     </script>
58     <script src="../../resources/js-test-post.js"></script>
59 </body>
60 </html>