Fix the CSS grid layout tests added in r120984
authortony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 22:37:58 +0000 (22:37 +0000)
committertony@chromium.org <tony@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 22 Jun 2012 22:37:58 +0000 (22:37 +0000)
https://bugs.webkit.org/show_bug.cgi?id=89782

Reviewed by Julien Chaffraix.

We need to call testRunner.overridePreference("WebKitCSSGridLayoutEnabled", true)
to enable grid layout in tests. These tests were passing due to other bugs in the tests.

* fast/css-grid-layout/containing-block-grids-expected.html: Simplify expected results.
* fast/css-grid-layout/containing-block-grids.html: Set the display to none and override it with grid/inline-grid to make sure it's applying.
The default display of block would also produce the correct results.
* fast/css-grid-layout/floating-empty-grids-expected.html: Fix a missing close } which was causing the
other styles to be ignored. Also, one of the boxes wasn't showing up because it was a div instead of a span.
* fast/css-grid-layout/floating-empty-grids.html: Same fixes as for expected.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@121063 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/fast/css-grid-layout/containing-block-grids-expected.html
LayoutTests/fast/css-grid-layout/containing-block-grids.html
LayoutTests/fast/css-grid-layout/floating-empty-grids-expected.html
LayoutTests/fast/css-grid-layout/floating-empty-grids.html

index ff44cc0..42f26dc 100644 (file)
@@ -1,3 +1,20 @@
+2012-06-22  Tony Chang  <tony@chromium.org>
+
+        Fix the CSS grid layout tests added in r120984
+        https://bugs.webkit.org/show_bug.cgi?id=89782
+
+        Reviewed by Julien Chaffraix.
+
+        We need to call testRunner.overridePreference("WebKitCSSGridLayoutEnabled", true)
+        to enable grid layout in tests. These tests were passing due to other bugs in the tests.
+
+        * fast/css-grid-layout/containing-block-grids-expected.html: Simplify expected results.
+        * fast/css-grid-layout/containing-block-grids.html: Set the display to none and override it with grid/inline-grid to make sure it's applying.
+        The default display of block would also produce the correct results.
+        * fast/css-grid-layout/floating-empty-grids-expected.html: Fix a missing close } which was causing the
+        other styles to be ignored. Also, one of the boxes wasn't showing up because it was a div instead of a span.
+        * fast/css-grid-layout/floating-empty-grids.html: Same fixes as for expected.
+
 2012-06-22  Michael Nordman  <michaeln@google.com>
 
         ApplicationCache - verify that an open network whitelist doesn't break online vs fallback layering.
index 4350919..573f2b5 100644 (file)
@@ -2,13 +2,12 @@
 <html>
 <head>
     <style>
-        div { width: 100px; height: 100px; }
-        .relative-positioned-grid { background-color: red; position:relative; }
-        .relative-positioned-inline-grid { display: inline; background-color: red; position: relative; }
+        div { width: 100px; height: 200px; }
     </style>
 </head>
 <body>
 <p>Grids can act as containing blocks for positioned content.
-<div class="relative-positioned-grid"><div style="background-color: green; left: 0; top: 0"></div>
-<div class="relative-positioned-inline-grid"><div style="background-color:green; left: 0; top: 0"></div>
+<div style="width: 100px; height: 200px; background-color: green;"></div>
 </p>
+</body>
+</html>
index 5e30ec5..23850a4 100644 (file)
@@ -1,14 +1,20 @@
 <!DOCTYPE html>
 <html>
 <head>
+    <script>
+        if (window.testRunner)
+            testRunner.overridePreference("WebKitCSSGridLayoutEnabled", true);
+    </script>
     <style>
         div { width: 100px; height: 100px; }
-        .relative-positioned-grid { display: -webkit-grid; background-color: red; position:relative; }
-        .relative-positioned-inline-grid { display: -webkit-inline-grid; background-color: red; position: relative; }
+        .relative-positioned-grid { display: none; background-color: red; position:relative; }
+        .relative-positioned-inline-grid { display: none; background-color: red; position: relative; }
     </style>
 </head>
 <body>
 <p>Grids can act as containing blocks for positioned content.
-<div class="relative-positioned-grid"><div style="background-color: green; left: 0; top: 0"></div>
-<div class="relative-positioned-inline-grid"><div style="background-color:green; left: 0; top: 0"></div>
+<div class="relative-positioned-grid" style="display: -webkit-grid"><div style="background-color: green; left: 0; top: 0"></div>
+<div class="relative-positioned-inline-grid" style="display: -webkit-inline-grid"><div style="background-color:green; left: 0; top: 0"></div>
 </p>
+</body>
+</html>
index ed2401f..981de99 100644 (file)
@@ -2,17 +2,17 @@
 <html>
 <head>
     <style>
-        span { width: 100px; height: 100px;
+        span { width: 100px; height: 100px; }
         /* A grid is a block by default. */
         .grid { display: block; background-color: green; }
-        .inline-grid { display: inline; background-color: green; }
+        .inline-grid { display: inline-block; background-color: green; }
     </style>
 </head>
 <body>
 <p>In this paragraph <span class="grid" style="float:left"></span> there should be <span class="grid" style="float:right"></span>
 two empty grids.  One will float to the left and one will float to the right.  They should both be empty.</p>
 <br clear=all>
-<p>This grid should be positioned to the right. <div class="grid" style="position:absolute;right:8px"></div></p>
+<p>This grid should be positioned to the right. <span class="grid" style="position:absolute;right:8px;"></span></p>
 
 <p style="margin-top:115px">
 <span style="float:left;background-color:orange"></span><span class="inline-grid"></span> The green grid
index 15d44d1..a6e7d13 100644 (file)
@@ -1,8 +1,12 @@
 <!DOCTYPE html>
 <html>
 <head>
+    <script>
+        if (window.testRunner)
+            testRunner.overridePreference("WebKitCSSGridLayoutEnabled", true);
+    </script>
     <style>
-        span { width: 100px; height: 100px;
+        span { width: 100px; height: 100px; }
         .grid { display: -webkit-grid; background-color: green; }
         .inline-grid { display: -webkit-inline-grid; background-color: green; }
     </style>
@@ -11,7 +15,7 @@
 <p>In this paragraph <span class="grid" style="float:left"></span> there should be <span class="grid" style="float:right"></span>
 two empty grids.  One will float to the left and one will float to the right.  They should both be empty.</p>
 <br clear=all>
-<p>This grid should be positioned to the right. <div class="grid" style="position:absolute;right:8px"></div></p>
+<p>This grid should be positioned to the right. <span class="grid" style="position:absolute;right:8px"></span></p>
 
 <p style="margin-top:115px">
 <span style="float:left;background-color:orange"></span><span class="inline-grid"></span> The green grid