OLD | NEW |
(Empty) | |
| 1 <style> |
| 2 table { |
| 3 border-collapse: collapse; |
| 4 } |
| 5 td { |
| 6 border: 1px solid #000000; |
| 7 } |
| 8 </style> |
| 9 <script src="../../resources/check-layout.js"></script> |
| 10 <script> |
| 11 function calls() { |
| 12 removeCol(); |
| 13 checkLayout('tr'); |
| 14 } |
| 15 |
| 16 function removeCol() { |
| 17 var mutatedTable = document.getElementById("mutated-table"); |
| 18 var trElements = mutatedTable.getElementsByTagName('tr'); |
| 19 |
| 20 for (var i = 0; i < 3; i++) { |
| 21 // Remove the third child in each row |
| 22 var tr = trElements[i]; |
| 23 var tdElements = tr.getElementsByTagName('td'); |
| 24 var td = tdElements[2]; |
| 25 tr.removeChild(td) |
| 26 } |
| 27 } |
| 28 </script> |
| 29 <body onload="calls()"> |
| 30 <h3>Test for chromium bug : <a href="https://bugs.chromium.org/p/chromium/is
sues/detail?id=396653">396653</a>. Tables with specific merge cell configuration
render improperly when removing table column.</h3> |
| 31 <h4>Second row is rowspan-only-cell and some empty cells present in the row
because td node is deleted from the dom tree using script. So Please check that
second row height should not be zero in this case.</h4> |
| 32 <table id="mutated-table" style="width: 624px;"> |
| 33 <tbody> |
| 34 <tr data-expected-height="32"> |
| 35 <td rowspan="2" style="height: 117px;"></td> |
| 36 <td style="height: 32px;"></td> |
| 37 <td style="height: 32px;"></td> |
| 38 </tr> |
| 39 <tr data-expected-height="85"> |
| 40 <td style="height: 32px; display: none;"></td> |
| 41 <td rowspan="2" style="height: 117px;"></td> |
| 42 <td style="height: 84px;"></td> |
| 43 </tr> |
| 44 <tr data-expected-height="32"> |
| 45 <td style="height: 32px;"></td> |
| 46 <td style="height: 32px; display: none;"></td> |
| 47 <td style="height: 32px;"></td> |
| 48 </tr> |
| 49 </tbody> |
| 50 </table> |
| 51 </body> |
OLD | NEW |