Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / tables / mozilla / dom / insertColGroups1.html
blob141997ec9767667307e9793a3a82b3ca07cd6e4a
1 <HEAD>
2 <SCRIPT src=tableDom.js>
3 </SCRIPT>
4 <SCRIPT>
6 function doIt() {
7 var table = document.getElementsByTagName("TABLE")[0];
8 var refCg = document.getElementsByTagName("COLGROUP")[0];
9 var cg = document.createElement("COLGROUP", null);
10 var col = document.createElement("COL", null);
11 col.width = 100;
12 cg.appendChild(col);
13 col = document.createElement("COL", null);
14 col.width = 200;
15 cg.appendChild(col);
16 table.insertBefore(cg, refCg);
18 </SCRIPT>
19 </HEAD>
20 <BODY onload="doIt()">
21 The 2 tables should look the same
22 <table bgcolor=orange border>
23 <colgroup>
24 <col width=300>
25 </colgroup>
26 <tr>
27 <td>100</td><td>200</td><td>300</td>
28 </tr>
29 </table>
30 <BR>
31 <table bgcolor=orange border>
32 <colgroup>
33 <col width=100>
34 <col width=200>
35 </colgroup>
36 <colgroup>
37 <col width=300>
38 </colgroup>
39 <tr>
40 <td>100</td><td>200</td><td>300</td>
41 </tr>
42 </table>
43 <BR>
44 </BODY></HTML>