OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <script src="../../resources/js-test.js"></script> |
| 3 <p>Test that a table-caption with a table-cell sibling is wrapped inside an inli
ne-table when the parent is inline.</p> |
| 4 <span> |
| 5 <div id="first" style="display:table-caption; width:100%; height:40px; backg
round:blue;"> </div> |
| 6 <div id="second" style="display:table-cell; width:80px; height:40px; backgro
und:blue;"> </div> |
| 7 <span id="last">There should be a blue square to the left of this line.</spa
n> |
| 8 </span> |
| 9 <div id="console"></div> |
| 10 <script> |
| 11 var firstRects = document.getElementById('first').getClientRects(); |
| 12 var secondRects = document.getElementById('second').getClientRects(); |
| 13 var lastRects = document.getElementById('last').getClientRects(); |
| 14 shouldBe("firstRects.length", "1"); |
| 15 shouldBe("secondRects.length", "1"); |
| 16 shouldBe("lastRects.length", "1"); |
| 17 shouldBe("secondRects[0].top", "firstRects[0].top + 40"); |
| 18 shouldBe("secondRects[0].left", "firstRects[0].left"); |
| 19 shouldBe("secondRects[0].bottom", "secondRects[0].top + 40"); |
| 20 shouldBeGreaterThanOrEqual("lastRects[0].right", "secondRects[0].left"); |
| 21 shouldBeGreaterThanOrEqual("lastRects[0].top", "firstRects[0].top"); |
| 22 shouldBeGreaterThanOrEqual("secondRects[0].bottom", "lastRects[0].bottom"); |
| 23 </script> |
OLD | NEW |