| <!DOCTYPE HTML> |
| <html> |
| <head> |
| <style> |
| #container { |
| width: 1px; |
| } |
| #table { |
| width: 300px; |
| table-layout: fixed; |
| } |
| td { |
| padding: 0; |
| } |
| .wide { |
| width: 100px; |
| } |
| </style> |
| <script src="../../resources/check-layout.js"></script> |
| </head> |
| <body> |
| This test verifies table cell width is correctly updated after a table-layout change. |
| <div id="container"> |
| <table id="table"> |
| <thead><tr><td data-expected-width="100"></td><td data-expected-width="100"></td><td class="wide" data-expected-width="100"></td></tr></thead> |
| <tbody><tr><td data-expected-width="100"></td><td class="wide" data-expected-width="100"></td><td data-expected-width="100"></td></tr></tbody> |
| <tfoot><tr><td class="wide" data-expected-width="100"></td><td data-expected-width="100"></td><td data-expected-width="100"></td></tr></tfoot> |
| </table> |
| </div> |
| <div id="test-output"></div> |
| </body> |
| <script> |
| document.body.offsetTop; |
| |
| var container = document.getElementById('container'); |
| container.style.setProperty('width', '500px'); |
| |
| var table = document.getElementById('table'); |
| table.style.setProperty('table-layout', 'auto'); |
| table.style.setProperty('width', 'auto'); |
| |
| window.checkLayout("td", document.getElementById("test-output")); |
| </script> |
| </html> |