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-cell.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4     <style>
5     td
6     {
7         width: 50px;
8         height: 40px;
9     }
10     table.small td
11     {
12         height: 20px;
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></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 smallRows = false;
37
38     function toggleSmallRows()
39     {
40         var table = document.querySelector("table")
41         smallRows = !smallRows;
42         if (smallRows)
43             table.classList.add("small");
44         else
45             table.classList.remove("small");
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
50     firstRow = document.getElementById("firstRow");
51     // Original value.
52     shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'44px'");
53
54     toggleSmallRows();
55     shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'24px'");
56     toggleSmallRows();
57     shouldBe("getComputedStyle(firstRow, '').getPropertyValue('height')", "'44px'");
58     </script>
59     <script src="../../resources/js-test-post.js"></script>
60 </body>
61 </html>