Made Table tests for Bug 70678 Platform Independent
[WebKit-https.git] / LayoutTests / fast / table / table-anonymous-cell-bug.html
index bf5d4c0ad361405afe38101ba70aa49c3be6b8f9..59cea5bacca6f380ff667129953958b99c172ff7 100644 (file)
@@ -6,6 +6,7 @@
     div.section { display: table-row-group; }
     div.cell { display: table-cell; width: 50px; height: 50px; background-color: blue; }
     div.row { display: table-row; }
+    div.test { background-color: green; width: 50px; height: 50px; }
 </style>
 
 <div class="table" id="table-1">
 </div>
 
 <script>
-    function createSpan()
+    function createDiv()
     {
-      var spanElement = document.createElement("span");
-      spanElement.appendChild(document.createTextNode("Some text."));
-      return spanElement;
+      var divElement = document.createElement("div");
+      divElement.setAttribute("class", "test");
+      return divElement;
     }
 
-    function insertSpan(tableID, beforeID)
+    function insertDiv(tableID, beforeID)
     {
         var tableRow = document.getElementById(tableID);
         var before = document.getElementById(beforeID);
-        tableRow.insertBefore(createSpan(), before);
+        tableRow.insertBefore(createDiv(), before);
     }
 
     document.body.offsetTop;
 
-    insertSpan("row-1", "cell-2");
+    insertDiv("row-1", "cell-2");
 </script>
 </body>
 </html>