| background-color: skyblue; |
| <script src="../../resources/js-test-pre.js"></script> |
| <td id="cell">Should not wrap</td> |
| <div id="display-cell">Should not wrap</div> |
| function getElementHeight(element) |
| var rect = element.getBoundingClientRect();; |
| return rect.bottom - rect.top; |
| function testHeight(id, description) |
| var cellElement = document.getElementById(id); |
| var expectedHeight = getElementHeight(cellElement); |
| cellElement.style.whiteSpace = 'normal'; |
| if (getElementHeight(cellElement) == expectedHeight) |
| testPassed(description + ' does not wrap.'); |
| testFailed(description + ' wrapps.'); |
| testHeight('cell', 'table cell'); |
| testHeight('display-cell', 'display: table-cell'); |