| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <style> | 3 <style> |
| 4 .styledForTest { | 4 .styledForTest { |
| 5 -moz-box-sizing: border-box; | 5 -moz-box-sizing: border-box; |
| 6 box-sizing: border-box; | 6 box-sizing: border-box; |
| 7 background-color: orange; | 7 background-color: orange; |
| 8 color: white; | 8 color: white; |
| 9 border: 7px solid black; | 9 border: 7px solid black; |
| 10 padding: 5px; | 10 padding: 5px; |
| 11 width: 80px; | 11 width: 80px; |
| 12 height: 30px; | 12 height: 30px; |
| 13 margin: 2px; | 13 margin: 2px; |
| 14 } | 14 } |
| 15 </style> | 15 </style> |
| 16 | 16 |
| 17 <p id="description">All of the boxes should be 80x30 and look identical.</p> | 17 <p id="description">All of the boxes should be 80x30 and look identical.</p> |
| 18 <div id="console"></div> | 18 <div id="console"></div> |
| 19 | 19 |
| 20 <div id="expected" class="styledForTest"></div> | 20 <div id="expected" class="styledForTest"></div> |
| 21 | 21 |
| 22 <div id="div-display-table-cell" class="styledForTest" style="display: table-cel
l;"></div> | 22 <div id="div-display-table-cell" class="styledForTest" style="display: table-cel
l;"></div> |
| 23 | 23 |
| 24 <table> | 24 <table> |
| 25 <tr> | 25 <tr> |
| 26 <td id="td" class="styledForTest"></td> | 26 <td id="td" class="styledForTest"></td> |
| 27 </tr> | 27 </tr> |
| 28 </table> | 28 </table> |
| 29 | 29 |
| 30 <script src="../js/resources/js-test-pre.js"></script> | 30 <script src="../../resources/js-test.js"></script> |
| 31 <script> | 31 <script> |
| 32 description('Tests that display: table-cell and box-sizing: border-box work when
used together.'); | 32 description('Tests that display: table-cell and box-sizing: border-box work when
used together.'); |
| 33 | 33 |
| 34 ['div-display-table-cell', 'td'].forEach(function (id) { | 34 ['div-display-table-cell', 'td'].forEach(function (id) { |
| 35 debug(id); | 35 debug(id); |
| 36 element = document.querySelector('#' + id); | 36 element = document.querySelector('#' + id); |
| 37 shouldBe('element.offsetWidth', '80'); | 37 shouldBe('element.offsetWidth', '80'); |
| 38 shouldBe('element.offsetHeight', '30'); | 38 shouldBe('element.offsetHeight', '30'); |
| 39 }); | 39 }); |
| 40 | 40 |
| 41 </script> | 41 </script> |
| OLD | NEW |