8 border-collapse:collapse;
22 <script src=
"../../resources/js-test.js"></script>
25 <p> CASE
1 : Form element inside table.
</p>
34 <p> CASE
2 : Form element inside table section(tbody,thead or tfoot).
</p>
45 <p> CASE
3 : Form element inside table row.
</p>
54 <div id=
"description"></div>
55 <div id=
"console"></div>
57 description('Testcase for bug <a href="http://webkit.org/b/86746">http://webkit.org/b/86746</a>. A form element whose immediate parent is either a table, \
58 table section or a table row is considered as a demoted element. <br>Renderer for such an element is not created when its display is to a \
59 non table type (Eg. BLOCK, INLINE, etc). However when a table containing form element is cloned, <br>the form element is not properly demoted. \
60 This results in the creation of an unexpected renderer for the form element.');
61 debug('Expected: The tables should contain only one row of width 150px and one column of height 20px.<br>');
63 for(var i
= 1; i
<=3; i
++) {
64 var container
= document
.getElementById('case' + i
);
65 clonedTable
= container
.getElementsByTagName("TABLE")[0].cloneNode(true);
66 clonedTable
.style
.display
= 'table';
67 container
.appendChild(clonedTable
);
68 shouldBe('clonedTable.getBoundingClientRect().width', '150');
69 shouldBe('clonedTable.getBoundingClientRect().height', '20');
72 var testCasesContainer
= document
.getElementById('testCases');
73 document
.body
.removeChild(testCasesContainer
);