OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <div id="multicol" style="columns:3; column-fill:auto; column-gap:0; height:90px
; line-height:20px;"> |
| 3 <br> |
| 4 <br> |
| 5 <table cellspacing="0" cellpadding="0"> |
| 6 <tr style="height:50px;"> |
| 7 <td><br></td> |
| 8 </tr> |
| 9 <tr id="secondRow" style="height:61px; background:blue;"> |
| 10 <td id="secondCell"><div style="width:61px;"><br></div></td> |
| 11 </tr> |
| 12 <tr> |
| 13 <td><br></td> |
| 14 </tr> |
| 15 </table> |
| 16 </div> |
| 17 |
| 18 <script src="../resources/testharness.js"></script> |
| 19 <script src="../resources/testharnessreport.js"></script> |
| 20 <script> |
| 21 var multicol = document.getElementById("multicol"); |
| 22 var row = document.getElementById("secondRow"); |
| 23 var cell = document.getElementById("secondCell"); |
| 24 |
| 25 // Check the height of the second row and its cell a few times, with a |
| 26 // layout pass between each check, to verify that it's stable. |
| 27 |
| 28 test(() => { |
| 29 assert_equals(cell.offsetTop, 50); |
| 30 assert_equals(cell.offsetHeight, 61); |
| 31 assert_equals(row.offsetTop, 50); |
| 32 assert_equals(row.offsetHeight, 61); |
| 33 }, "Row height should be as specified."); |
| 34 |
| 35 test(() => { |
| 36 // Change width and verify that layout remains the same, block direction
-wise. |
| 37 multicol.style.width = "500px"; |
| 38 |
| 39 assert_equals(cell.offsetTop, 50); |
| 40 assert_equals(cell.offsetHeight, 61); |
| 41 assert_equals(row.offsetTop, 50); |
| 42 assert_equals(row.offsetHeight, 61); |
| 43 |
| 44 }, "Row height should be as specified after relayout."); |
| 45 |
| 46 test(() => { |
| 47 // Change width and verify that layout remains the same, block direction
-wise. |
| 48 multicol.style.width = "550px"; |
| 49 |
| 50 assert_equals(cell.offsetTop, 50); |
| 51 assert_equals(cell.offsetHeight, 61); |
| 52 assert_equals(row.offsetTop, 50); |
| 53 assert_equals(row.offsetHeight, 61); |
| 54 |
| 55 }, "Row height should be as specified after another relayout."); |
| 56 |
| 57 test(() => { |
| 58 // Change width and verify that layout remains the same, block direction
-wise. |
| 59 multicol.style.width = "600px"; |
| 60 |
| 61 assert_equals(cell.offsetTop, 50); |
| 62 assert_equals(cell.offsetHeight, 61); |
| 63 assert_equals(row.offsetTop, 50); |
| 64 assert_equals(row.offsetHeight, 61); |
| 65 |
| 66 }, "Row height should be as specified after yet another relayout."); |
| 67 </script> |
OLD | NEW |