Title: [209721] trunk/LayoutTests
Revision
209721
Author
[email protected]
Date
2016-12-12 12:49:11 -0800 (Mon, 12 Dec 2016)

Log Message

[css-grid] Add some test cases that were removed in r209562
https://bugs.webkit.org/show_bug.cgi?id=165750

Reviewed by Sergio Villar Senin.

Some valid test cases were removed in r209562, this patch adds them back.

* fast/css-grid-layout/grid-template-shorthand-get-set.html: The specified style is now preserved,
so we've to use a different value for it (as it doesn't merge the line names).
* fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Flexible sizes must be non-negative,
but 0fr should be accepted (this is new as it was not working like that with the old parser).
A space between the dimension and the unit is wrong for flexible sizes.
* fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: Ditto.

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (209720 => 209721)


--- trunk/LayoutTests/ChangeLog	2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/ChangeLog	2016-12-12 20:49:11 UTC (rev 209721)
@@ -1,3 +1,19 @@
+2016-12-12  Manuel Rego Casasnovas  <[email protected]>
+
+        [css-grid] Add some test cases that were removed in r209562
+        https://bugs.webkit.org/show_bug.cgi?id=165750
+
+        Reviewed by Sergio Villar Senin.
+
+        Some valid test cases were removed in r209562, this patch adds them back.
+
+        * fast/css-grid-layout/grid-template-shorthand-get-set.html: The specified style is now preserved,
+        so we've to use a different value for it (as it doesn't merge the line names).
+        * fast/css-grid-layout/resources/grid-columns-rows-get-set.js: Flexible sizes must be non-negative,
+        but 0fr should be accepted (this is new as it was not working like that with the old parser).
+        A space between the dimension and the unit is wrong for flexible sizes.
+        * fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js: Ditto.
+
 2016-12-12  Zalan Bujtas  <[email protected]>
 
         The CSS 'columns' property when set on the <body> element makes short columns

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt (209720 => 209721)


--- trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt	2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-columns-rows-get-set-expected.txt	2016-12-12 20:49:11 UTC (rev 209721)
@@ -124,6 +124,10 @@
 PASS element.style.gridTemplateColumns is "3fr"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "600px"
 PASS element.style.gridTemplateRows is "4fr"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px"
+PASS element.style.gridTemplateColumns is "0fr"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px"
+PASS element.style.gridTemplateRows is "0fr"
 
 Test getting and setting grid-template-columns and grid-template-rows to calc() values through JS
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "150px"
@@ -184,6 +188,8 @@
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
 
 Test setting grid-template-columns and grid-template-rows back to 'none' through JS
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "18px"

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt (209720 => 209721)


--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt	2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set-expected.txt	2016-12-12 20:49:11 UTC (rev 209721)
@@ -174,6 +174,12 @@
 PASS element.style.gridTemplateRows is "[head] 15px [tail]"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "\"a\""
 PASS element.style.gridTemplateAreas is "\"a\""
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "100px"
+PASS element.style.gridTemplateColumns is "100px"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]"
+PASS element.style.gridTemplateRows is "[foo1 bar1] 50px [foo2 bar2] [foo3 bar3] 50px [foo4 bar4]"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-areas') is "\"a\" \"b\""
+PASS element.style.gridTemplateAreas is "\"a\" \"b\""
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px"
 PASS element.style.gridTemplateColumns is "none"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px"

Modified: trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html (209720 => 209721)


--- trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html	2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/grid-template-shorthand-get-set.html	2016-12-12 20:49:11 UTC (rev 209721)
@@ -267,6 +267,7 @@
     debug("Test getting and setting grid-template shorthand through JS");
     testGridDefinitionsSetJSValues("66px / 18px", "18px", "66px", "none");
     testGridDefinitionsSetJSValues("[head] 'a' 15px [tail] / 10px", "10px", "[head] 15px [tail]", "\"a\"");
+    testGridDefinitionsSetJSValues("[foo1 bar1] 'a' 50px [foo2 bar2] [foo3 bar3] 'b' 50px [foo4 bar4] / 100px", "100px", "[foo1 bar1] 50px [foo2 bar2 foo3 bar3] 50px [foo4 bar4]", "\"a\" \"b\"", "100px", "[foo1 bar1] 50px [foo2 bar2] [foo3 bar3] 50px [foo4 bar4]");
     testGridDefinitionsSetJSValues("'a'", "0px", "0px", "\"a\"", "none", "auto");
 
     debug("");

Modified: trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt (209720 => 209721)


--- trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt	2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/non-grid-columns-rows-get-set-expected.txt	2016-12-12 20:49:11 UTC (rev 209721)
@@ -110,6 +110,10 @@
 PASS element.style.gridTemplateColumns is "minmax(auto, 8vh)"
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "minmax(80px, auto)"
 PASS element.style.gridTemplateRows is "minmax(10vw, auto)"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "0px"
+PASS element.style.gridTemplateColumns is "0fr"
+PASS getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "0px"
+PASS element.style.gridTemplateRows is "0fr"
 
 Test setting grid-template-columns and grid-template-rows to bad values through JS
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
@@ -132,6 +136,8 @@
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
 PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "none"
+PASS window.getComputedStyle(element, '').getPropertyValue('grid-template-rows') is "none"
 
 Test setting grid-template-columns and grid-template-rows back to 'none' through JS
 PASS getComputedStyle(element, '').getPropertyValue('grid-template-columns') is "18px"

Modified: trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js (209720 => 209721)


--- trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js	2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/grid-columns-rows-get-set.js	2016-12-12 20:49:11 UTC (rev 209721)
@@ -64,6 +64,9 @@
 // A leading '+' is allowed.
 testGridTemplatesSetJSValues("+3fr", "+4fr", "800px", "600px", "3fr", "4fr");
 
+// 0fr is allowed.
+testGridTemplatesSetJSValues(".0000fr", "0fr", "0px", "0px", "0fr", "0fr");
+
 debug("");
 debug("Test getting and setting grid-template-columns and grid-template-rows to calc() values through JS");
 testGridTemplatesSetJSValues("calc(150px)", "calc(75px)", "150px", "75px");
@@ -93,6 +96,8 @@
 
 testGridTemplatesSetBadJSValues("-2fr", "3ffr");
 testGridTemplatesSetBadJSValues("-2.05fr", "+-3fr");
+// A dimension doesn't allow spaces between the number and the unit.
+testGridTemplatesSetBadJSValues("1r", "13 fr");
 
 testGridTemplatesSetBadJSValues("7.-fr", "-8,0fr");
 

Modified: trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js (209720 => 209721)


--- trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js	2016-12-12 20:35:12 UTC (rev 209720)
+++ trunk/LayoutTests/fast/css-grid-layout/resources/non-grid-columns-rows-get-set.js	2016-12-12 20:49:11 UTC (rev 209721)
@@ -56,6 +56,8 @@
 // A leading '+' is allowed.
 testNonGridTemplatesSetJSValues("+3fr", "+4fr", "3fr", "4fr", "3fr", "4fr");
 testNonGridTemplatesSetJSValues("minmax(auto, 8vh)", "minmax(10vw, auto)", "minmax(auto, 48px)", "minmax(80px, auto)");
+// 0fr is allowed.
+testGridTemplatesSetJSValues(".0000fr", "0fr", "0px", "0px", "0fr", "0fr");
 
 debug("");
 debug("Test setting grid-template-columns and grid-template-rows to bad values through JS");
@@ -72,6 +74,8 @@
 testGridTemplatesSetBadJSValues("-2fr", "3ffr");
 testGridTemplatesSetBadJSValues("-2.05fr", "+-3fr");
 testGridTemplatesSetBadJSValues("7.-fr", "-8,0fr");
+// A dimension doesn't allow spaces between the number and the unit.
+testGridTemplatesSetBadJSValues("1r", "13 fr");
 // Negative values are not allowed.
 testGridTemplatesSetBadJSValues("-1px", "-6em");
 testGridTemplatesSetBadJSValues("minmax(-1%, 32%)", "minmax(2vw, -6em)");
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to