Made Table tests for Bug 70678 Platform Independent
[WebKit-https.git] / LayoutTests / fast / table / table-anonymous-cell-bug.html
1 <!DOCTYPE html>
2 <html>
3 <body style="font-family: ahem; -webkit-font-smoothing: none;">
4 <style>
5     div.table { display: table; }
6     div.section { display: table-row-group; }
7     div.cell { display: table-cell; width: 50px; height: 50px; background-color: blue; }
8     div.row { display: table-row; }
9     div.test { background-color: green; width: 50px; height: 50px; }
10 </style>
11
12 <div class="table" id="table-1">
13   <div class="section" id="tbody-1">
14     <div class="row" id="row-1">
15       <div class="cell" id="cell-1"></div>
16       <div class="cell" id="cell-2"></div>
17     </div>
18   </div>
19 </div>
20
21 <script>
22     function createDiv()
23     {
24       var divElement = document.createElement("div");
25       divElement.setAttribute("class", "test");
26       return divElement;
27     }
28
29     function insertDiv(tableID, beforeID)
30     {
31         var tableRow = document.getElementById(tableID);
32         var before = document.getElementById(beforeID);
33         tableRow.insertBefore(createDiv(), before);
34     }
35
36     document.body.offsetTop;
37
38     insertDiv("row-1", "cell-2");
39 </script>
40 </body>
41 </html>