Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / table / append-cells.html
blob661619fb28273cedce70129438499a96e698185e
1 <html>
2 <head>
3 <title>Don't let appendChild break the table column count (bug 3702)</title>
4 </head>
5 <body>
6 <p>Both rows should have the same width (725px).</p>
7 <table cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 725px;">
8 <tr id='first_row'>
9 </tr>
10 <tr>
11 <td>&nbsp;</td>
12 <td>&nbsp;</td>
13 <td>&nbsp;</td>
14 <td>&nbsp;</td>
15 </tr>
16 </table>
18 <!-- reference rendering -->
19 <table cellpadding="0" cellspacing="0" style="table-layout: fixed; width: 725px;">
20 <tr>
21 <td style="background-color: LawnGreen;">1</td>
22 <td style="background-color: Cyan;">2</td>
23 <td style="background-color: Yellow;">3</td>
24 <td style="background-color: Orange;">4</td>
25 </tr>
26 </table>
29 <script>
30 firstRow = document.getElementById("first_row")
32 function addCell(color) {
33 cell = document.createElement("td");
34 cell.appendChild(document.createTextNode("cell"));
35 cell.setAttribute("style", "background-color: " + color + ";");
36 firstRow.appendChild(cell);
39 addCell("LawnGreen");
40 addCell("Cyan");
41 addCell("Yellow");
42 addCell("Orange");
43 </script>
44 </body>
45 </html>