[CSS Grid Layout] Support dots sequences in grid-template-areas
[WebKit-https.git] / LayoutTests / fast / css-grid-layout / grid-template-areas-get-set.html
index 7a9666f..dfb03d8 100644 (file)
@@ -1,10 +1,6 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE html>
 <html>
 <head>
 <html>
 <head>
-<script>
-if (window.testRunner)
-    testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1);
-</script>
 <link href="resources/grid.css" rel="stylesheet">
 <style>
 #gridWithSingleStringTemplate {
 <link href="resources/grid.css" rel="stylesheet">
 <style>
 #gridWithSingleStringTemplate {
@@ -29,11 +25,56 @@ if (window.testRunner)
                                  ".";
 }
 
                                  ".";
 }
 
+#gridWithSpanningRowsDotsTemplate {
+    -webkit-grid-template-areas: "span"
+                                 "....";
+}
+
 #gridWithDotColumn {
     -webkit-grid-template-areas: "header ."
                                  "footer .";
 }
 
 #gridWithDotColumn {
     -webkit-grid-template-areas: "header ."
                                  "footer .";
 }
 
+#gridWithDotsColumn {
+    -webkit-grid-template-areas: "header ......"
+                                 "footer ......";
+}
+
+#gridWithDotCells {
+    -webkit-grid-template-areas: "first ."
+                                 ". second";
+}
+
+#gridWithDotsCells {
+    -webkit-grid-template-areas: "first ......"
+                                 "..... second";
+}
+
+#gridWithComplexDotAreas {
+    -webkit-grid-template-areas: ". header header ."
+                                 ". . . ."
+                                 "nav main main aside"
+                                 "nav main main aside"
+                                 ". . . aside"
+                                 ". footer footer aside";
+}
+
+#gridWithComplexDotsAreas {
+    -webkit-grid-template-areas: "... header header ....."
+                                 "... ...... ...... ....."
+                                 "nav main   main   aside"
+                                 "nav main   main   aside"
+                                 "... ...... ...... aside"
+                                 "... footer footer aside";
+}
+
+#gridWithMixedDotAndDotsAreas {
+    -webkit-grid-template-areas: "... title ."
+                                 "..  main main"
+                                 "nav ................... aside"
+                                 ". footer ......";
+}
+
 #gridWithHorizontalRectangle {
     -webkit-grid-template-areas: "a a a"
                                  "a a a";
 #gridWithHorizontalRectangle {
     -webkit-grid-template-areas: "a a a"
                                  "a a a";
@@ -55,7 +96,14 @@ if (window.testRunner)
 <div class="grid" id="gridWithTwoRowsTemplate"></div>
 <div class="grid" id="gridWithSpanningColumnsTemplate"></div>
 <div class="grid" id="gridWithSpanningRowsDotTemplate"></div>
 <div class="grid" id="gridWithTwoRowsTemplate"></div>
 <div class="grid" id="gridWithSpanningColumnsTemplate"></div>
 <div class="grid" id="gridWithSpanningRowsDotTemplate"></div>
+<div class="grid" id="gridWithSpanningRowsDotsTemplate"></div>
 <div class="grid" id="gridWithDotColumn"></div>
 <div class="grid" id="gridWithDotColumn"></div>
+<div class="grid" id="gridWithDotsColumn"></div>
+<div class="grid" id="gridWithDotCells"></div>
+<div class="grid" id="gridWithDotsCells"></div>
+<div class="grid" id="gridWithComplexDotAreas"></div>
+<div class="grid" id="gridWithComplexDotsAreas"></div>
+<div class="grid" id="gridWithMixedDotAndDotsAreas"></div>
 <div class="grid" id="gridWithHorizontalRectangle"></div>
 <div class="grid" id="gridWithVerticalRectangle"></div>
 <script>
 <div class="grid" id="gridWithHorizontalRectangle"></div>
 <div class="grid" id="gridWithVerticalRectangle"></div>
 <script>
@@ -77,7 +125,14 @@ if (window.testRunner)
     testGridTemplateAreas("gridWithTwoRowsTemplate", '"first" "second"');
     testGridTemplateAreas("gridWithSpanningColumnsTemplate", '"span span"');
     testGridTemplateAreas("gridWithSpanningRowsDotTemplate", '"span" "."');
     testGridTemplateAreas("gridWithTwoRowsTemplate", '"first" "second"');
     testGridTemplateAreas("gridWithSpanningColumnsTemplate", '"span span"');
     testGridTemplateAreas("gridWithSpanningRowsDotTemplate", '"span" "."');
+    testGridTemplateAreas("gridWithSpanningRowsDotsTemplate", '"span" "."');
     testGridTemplateAreas("gridWithDotColumn", '"header ." "footer ."');
     testGridTemplateAreas("gridWithDotColumn", '"header ." "footer ."');
+    testGridTemplateAreas("gridWithDotsColumn", '"header ." "footer ."');
+    testGridTemplateAreas("gridWithDotCells", '"first ." ". second"');
+    testGridTemplateAreas("gridWithDotsCells", '"first ." ". second"');
+    testGridTemplateAreas("gridWithComplexDotAreas", '". header header ." ". . . ." "nav main main aside" "nav main main aside" ". . . aside" ". footer footer aside"');
+    testGridTemplateAreas("gridWithComplexDotsAreas", '". header header ." ". . . ." "nav main main aside" "nav main main aside" ". . . aside" ". footer footer aside"');
+    testGridTemplateAreas("gridWithMixedDotAndDotsAreas", '". title ." ". main main" "nav . aside" ". footer ."');
     testGridTemplateAreas("gridWithHorizontalRectangle", '"a a a" "a a a"');
     testGridTemplateAreas("gridWithVerticalRectangle", '"a a" "a a" "a a"');
 
     testGridTemplateAreas("gridWithHorizontalRectangle", '"a a a" "a a a"');
     testGridTemplateAreas("gridWithVerticalRectangle", '"a a" "a a" "a a"');
 
@@ -87,6 +142,11 @@ if (window.testRunner)
     element.style.webkitGridTemplateAreas = "'foobar'";
     testJSGridTemplateAreas(element, '"foobar"');
     element.style.webkitGridTemplateAreas = "initial";
     element.style.webkitGridTemplateAreas = "'foobar'";
     testJSGridTemplateAreas(element, '"foobar"');
     element.style.webkitGridTemplateAreas = "initial";
+    testJSGridTemplateAreas(element, 'none');
+    element.style.webkitGridTemplateAreas = "'foobar'";
+    testJSGridTemplateAreas(element, '"foobar"');
+    element.style.webkitGridTemplateAreas = "none";
+    testJSGridTemplateAreas(element, 'none');
     document.body.removeChild(element);
 
     debug("Test grid-template-areas: inherit");
     document.body.removeChild(element);
 
     debug("Test grid-template-areas: inherit");