1 description('Test behavior of the HTMLTableRowElement cells attribute in cases where there is unusual nesting.');
3 function checkCellNesting(tag
)
5 var row
= document
.createElement("tr");
6 var container
= document
.createElement(tag
);
7 var cell
= document
.createElement("td");
8 row
.appendChild(container
);
9 container
.appendChild(cell
);
10 return row
.cells
.length
;
13 function checkHeaderCellNesting(tag
)
15 var row
= document
.createElement("tr");
16 var container
= document
.createElement(tag
);
17 var cell
= document
.createElement("th");
18 row
.appendChild(container
);
19 container
.appendChild(cell
);
20 return row
.cells
.length
;
36 for (i
= 0; i
< tags
.length
; ++i
)
37 shouldBe('checkCellNesting("' + tags
[i
] + '")', '0');
41 shouldBe('checkCellNesting("td")', '1');
42 shouldBe('checkCellNesting("th")', '1');
46 for (i
= 0; i
< tags
.length
; ++i
)
47 shouldBe('checkHeaderCellNesting("' + tags
[i
] + '")', '0');
51 shouldBe('checkHeaderCellNesting("td")', '1');
52 shouldBe('checkHeaderCellNesting("th")', '1');