OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <style> |
| 5 col { |
| 6 width: 200px; |
| 7 } |
| 8 td { |
| 9 background-color: #66f; |
| 10 height: 25px; |
| 11 } |
| 12 </style> |
| 13 <script type="text/javascript"> |
| 14 function changeColWidthUsingWidth(){ |
| 15 var col = document.getElementById('thecol'); |
| 16 col.style.width="100px"; |
| 17 window.checkLayout("td", document.getElementById("test-output"))
; |
| 18 } |
| 19 </script> |
| 20 <script src="../../../resources/check-layout.js"></script> |
| 21 </head> |
| 22 <body> |
| 23 Tests that the width of table cell changes on changing the colgroup widt
h to new width. |
| 24 <table> |
| 25 <colgroup> |
| 26 <col id="thecol"> |
| 27 </colgroup> |
| 28 <tbody> |
| 29 <tr> |
| 30 <td id="colWidth" data-expected-width="100"></td> |
| 31 </tr> |
| 32 </tbody> |
| 33 </table> |
| 34 <button onclick="changeColWidthUsingWidth();">Click me to test manually.
The column should shrink to 100px.</button> |
| 35 <div id="test-output"></div> |
| 36 </body> |
| 37 <script> |
| 38 if (window.eventSender) { |
| 39 eventSender.mouseMoveTo(50, 75); |
| 40 eventSender.mouseDown(); |
| 41 eventSender.mouseUp(); |
| 42 } |
| 43 </script> |
| 44 </html> |
OLD | NEW |