new regression tests
git-svn-id: svn://10.0.0.236/trunk@55837 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
f5f1bfbb66
commit
4cf56cb8b9
26
mozilla/layout/html/tests/table/core/cols1.html
Normal file
26
mozilla/layout/html/tests/table/core/cols1.html
Normal file
@ -0,0 +1,26 @@
|
||||
Both columns should be 200px
|
||||
<table bgcolor=orange border>
|
||||
<colgroup span=2 width=200></colgroup>
|
||||
<tr>
|
||||
<td>c11</td><td>c12</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
Both columns should be 200px
|
||||
<table bgcolor=orange border>
|
||||
<colgroup width=200>
|
||||
<col span=2>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>c11</td><td>c12</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
Both columns should be 200px
|
||||
<table bgcolor=orange border>
|
||||
<col width=200 span=2>
|
||||
<tr>
|
||||
<td>c11</td><td>c12</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
37
mozilla/layout/html/tests/table/dom/appendCol1.html
Normal file
37
mozilla/layout/html/tests/table/dom/appendCol1.html
Normal file
@ -0,0 +1,37 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 200;
|
||||
table.appendChild(col);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<col>
|
||||
<tr>
|
||||
<td>c11</td><td>c12</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<col>
|
||||
<col width=200>
|
||||
<tr>
|
||||
<td>c11</td><td>c12</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
41
mozilla/layout/html/tests/table/dom/appendCol2.html
Normal file
41
mozilla/layout/html/tests/table/dom/appendCol2.html
Normal file
@ -0,0 +1,41 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var cg = document.getElementsByTagName("COLGROUP")[0];
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 200;
|
||||
cg.appendChild(col);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>c11</td><td>c12</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col>
|
||||
<col width=200>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>c11</td><td>c12</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
48
mozilla/layout/html/tests/table/dom/appendColGroup1.html
Normal file
48
mozilla/layout/html/tests/table/dom/appendColGroup1.html
Normal file
@ -0,0 +1,48 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var cg = document.createElement("COLGROUP", null);
|
||||
cg.width=200
|
||||
var col = document.createElement("COL", null);
|
||||
cg.appendChild(col);
|
||||
col = document.createElement("COL", null);
|
||||
cg.appendChild(col);
|
||||
table.appendChild(cg);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=100>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>col-100</td><td>cg-200</td><td>cg-200</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=100>
|
||||
</colgroup>
|
||||
<colgroup width=200>
|
||||
<col>
|
||||
<col>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>col-100</td><td>cg-200</td><td>cg-200</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
38
mozilla/layout/html/tests/table/dom/deleteCol1.html
Normal file
38
mozilla/layout/html/tests/table/dom/deleteCol1.html
Normal file
@ -0,0 +1,38 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var col = document.getElementsByTagName("COL")[0];
|
||||
table.removeChild(col);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>200</td><td>300</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>200</td><td>300</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
38
mozilla/layout/html/tests/table/dom/deleteCol2.html
Normal file
38
mozilla/layout/html/tests/table/dom/deleteCol2.html
Normal file
@ -0,0 +1,38 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var col = document.getElementsByTagName("COL")[1];
|
||||
table.removeChild(col);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>100</td><td>300</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>100</td><td>300</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
38
mozilla/layout/html/tests/table/dom/deleteCol3.html
Normal file
38
mozilla/layout/html/tests/table/dom/deleteCol3.html
Normal file
@ -0,0 +1,38 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var col = document.getElementsByTagName("COL")[2];
|
||||
table.removeChild(col);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
37
mozilla/layout/html/tests/table/dom/deleteColGroup1.html
Normal file
37
mozilla/layout/html/tests/table/dom/deleteColGroup1.html
Normal file
@ -0,0 +1,37 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var colgroup = document.getElementsByTagName("COLGROUP")[0];
|
||||
table.removeChild(colgroup);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup span=2 width=100></colgroup>
|
||||
<colgroup span=2 width=200></colgroup>
|
||||
<tr>
|
||||
<td>200</td><td>200</td><td>auto</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup span=2 width=200></colgroup>
|
||||
<tr>
|
||||
<td>200</td><td>200</td><td>auto</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
37
mozilla/layout/html/tests/table/dom/deleteColGroup2.html
Normal file
37
mozilla/layout/html/tests/table/dom/deleteColGroup2.html
Normal file
@ -0,0 +1,37 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var colgroup = document.getElementsByTagName("COLGROUP")[1];
|
||||
table.removeChild(colgroup);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup span=2 width=100></colgroup>
|
||||
<colgroup span=2 width=200></colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>100</td><td>auto</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup span=2 width=100></colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>100</td><td>auto</td><td>auto</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
|
||||
</BODY></HTML>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@ -1,10 +1,17 @@
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/appendCells1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/appendCols1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/appendCols2.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/appendColGroups1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/appendCellsRebuild1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/appendRowsExpand1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/appendTbodyExpand1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteCellsRebuild1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteCellsShrink1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteCellsShrink2.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteCol1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteCol2.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteCol3.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteColGroup1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteRowsRebuild1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteTbodyExpand1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/deleteTbodyRebuild1.html
|
||||
@ -12,6 +19,13 @@ file:///s:/mozilla/layout/html/tests/table/dom/insertCellsExpand1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCellsExpand2.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCellsRebuild1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCellsRebuild2.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertColGroups1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertColGroups2.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCols1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCols2.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCols3.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCols4.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertCols5.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertRowsExpand1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertRowsRebuild1.html
|
||||
file:///s:/mozilla/layout/html/tests/table/dom/insertTbodyExpand1.html
|
||||
|
||||
45
mozilla/layout/html/tests/table/dom/insertColGroups1.html
Normal file
45
mozilla/layout/html/tests/table/dom/insertColGroups1.html
Normal file
@ -0,0 +1,45 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var refCg = document.getElementsByTagName("COLGROUP")[0];
|
||||
var cg = document.createElement("COLGROUP", null);
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 100;
|
||||
cg.appendChild(col);
|
||||
col = document.createElement("COL", null);
|
||||
col.width = 200;
|
||||
cg.appendChild(col);
|
||||
table.insertBefore(cg, refCg);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=300>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
</colgroup>
|
||||
<colgroup>
|
||||
<col width=300>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
</BODY></HTML>
|
||||
|
||||
51
mozilla/layout/html/tests/table/dom/insertColGroups2.html
Normal file
51
mozilla/layout/html/tests/table/dom/insertColGroups2.html
Normal file
@ -0,0 +1,51 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var refCg = document.getElementsByTagName("COLGROUP")[1];
|
||||
var cg = document.createElement("COLGROUP", null);
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 100;
|
||||
cg.appendChild(col);
|
||||
col = document.createElement("COL", null);
|
||||
col.width = 150;
|
||||
cg.appendChild(col);
|
||||
table.insertBefore(cg, refCg);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=50>
|
||||
</colgroup>
|
||||
<colgroup>
|
||||
<col width=200>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>50</td><td>100</td><td>150</td><td>200</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=50>
|
||||
</colgroup>
|
||||
<colgroup>
|
||||
<col width=100>
|
||||
<col width=150>
|
||||
</colgroup>
|
||||
<colgroup>
|
||||
<col width=200>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>50</td><td>100</td><td>150</td><td>200</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
</BODY></HTML>
|
||||
|
||||
34
mozilla/layout/html/tests/table/dom/insertCols1.html
Normal file
34
mozilla/layout/html/tests/table/dom/insertCols1.html
Normal file
@ -0,0 +1,34 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var refCol = document.getElementsByTagName("COL")[0];
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 100;
|
||||
table.insertBefore(col, refCol);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
</BODY></HTML>
|
||||
|
||||
35
mozilla/layout/html/tests/table/dom/insertCols2.html
Normal file
35
mozilla/layout/html/tests/table/dom/insertCols2.html
Normal file
@ -0,0 +1,35 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var refCol = document.getElementsByTagName("COL")[1];
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 200;
|
||||
table.insertBefore(col, refCol);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
</BODY></HTML>
|
||||
|
||||
37
mozilla/layout/html/tests/table/dom/insertCols3.html
Normal file
37
mozilla/layout/html/tests/table/dom/insertCols3.html
Normal file
@ -0,0 +1,37 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var table = document.getElementsByTagName("TABLE")[0];
|
||||
var refCol = document.getElementsByTagName("COL")[2];
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 150;
|
||||
table.insertBefore(col, refCol);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<col width=50>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<tr>
|
||||
<td>50</td><td>100</td><td>150</td><td>200</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<col width=50>
|
||||
<col width=100>
|
||||
<col width=150>
|
||||
<col width=200>
|
||||
<tr>
|
||||
<td>50</td><td>100</td><td>150</td><td>200</td>
|
||||
</tr>
|
||||
</table>
|
||||
</BODY></HTML>
|
||||
|
||||
38
mozilla/layout/html/tests/table/dom/insertCols4.html
Normal file
38
mozilla/layout/html/tests/table/dom/insertCols4.html
Normal file
@ -0,0 +1,38 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var cg = document.getElementsByTagName("COLGROUP")[0];
|
||||
var refCol = document.getElementsByTagName("COL")[0];
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 100;
|
||||
cg.insertBefore(col, refCol);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
</BODY></HTML>
|
||||
|
||||
38
mozilla/layout/html/tests/table/dom/insertCols5.html
Normal file
38
mozilla/layout/html/tests/table/dom/insertCols5.html
Normal file
@ -0,0 +1,38 @@
|
||||
<HEAD>
|
||||
<SCRIPT src=tableDom.js>
|
||||
</SCRIPT>
|
||||
<SCRIPT>
|
||||
|
||||
function doIt() {
|
||||
var cg = document.getElementsByTagName("COLGROUP")[0];
|
||||
var refCol = document.getElementsByTagName("COL")[1];
|
||||
var col = document.createElement("COL", null);
|
||||
col.width = 200;
|
||||
cg.insertBefore(col, refCol);
|
||||
}
|
||||
</SCRIPT>
|
||||
</HEAD>
|
||||
<BODY onload="doIt()">
|
||||
The 2 tables should look the same
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=100>
|
||||
<col width=300>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
<BR>
|
||||
<table bgcolor=orange border>
|
||||
<colgroup>
|
||||
<col width=100>
|
||||
<col width=200>
|
||||
<col width=300>
|
||||
</colgroup>
|
||||
<tr>
|
||||
<td>100</td><td>200</td><td>300</td>
|
||||
</tr>
|
||||
</table>
|
||||
</BODY></HTML>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user