Made Table tests for Bug 70678 Platform Independent
[WebKit-https.git] / LayoutTests / fast / table / table-anonymous-section-bug.html
index fb0f73a3d2e5485713e360e02da8deeaaa63fa76..4ea1c67811303b5fbe904c871acf7a1c8bf447f9 100644 (file)
@@ -4,6 +4,7 @@
 <style>
     div.table { display: table; }
     div.section { display: table-row-group; }
+    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 table = document.getElementById(tableID);
         var before = document.getElementById(beforeID);
-        table.insertBefore(createSpan(), before);
+        table.insertBefore(createDiv(), before);
     }
 
     document.body.offsetTop;
 
-    insertSpan("table-1", "tbody-2");
+    insertDiv("table-1", "tbody-2");
 </script>
 </body>
 </html>