Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(266)

Unified Diff: LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html

Issue 179383003: [CSS Grid Layout] Disallow using <ident> and function names as <custom-ident> (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html
diff --git a/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html b/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html
index c9aa5c2ff40936ba4fe2ed1889ba23b31e622a26..1f6cfc14b5ba3e5a4a036241c584bc4bb7b8e548 100644
--- a/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html
+++ b/LayoutTests/fast/css-grid-layout/non-named-grid-line-get-set.html
@@ -41,6 +41,18 @@
grid-template-columns: () 10px;
grid-template-rows: 20px ( ) 50px ();
}
+.gridWithAutoAsCustomIdent {
+ grid-template-columns: (auto) 10px 50px;
+ grid-template-rows: 50px (auto) 10px;
+}
+.gridWithMinmaxAsCustomIdent {
+ grid-template-columns: (minmax) 10px 50px;
+ grid-template-rows: 50px (minmax) 10px;
+}
+.gridWithSubgridAsCustomIdent {
+ grid-template-columns: (subgrid) 10px 50px;
+ grid-template-rows: 50px (subgrid) 10px;
+}
</style>
<script src="../../resources/js-test.js"></script>
</head>
@@ -56,6 +68,9 @@
<div class="gridWithPercentageSameStringMultipleTimes" id="gridWithPercentageSameStringMultipleTimes"></div>
<div class="gridWithRepeat" id="gridWithRepeatElement"></div>
<div class="gridWithEmptyParentheses" id="gridWithEmptyParentheses"></div>
+<div class="gridWithAutoAsCustomIdent" id="gridWithAutoAsCustomIdent"></div>
+<div class="gridWithMinmaxAsCustomIdent" id="gridWithMinmaxAsCustomIdent"></div>
+<div class="gridWithSubgridAsCustomIdent" id="gridWithSubgridAsCustomIdent"></div>
<script src="resources/grid-definitions-parsing-utils.js"></script>
<script>
@@ -87,20 +102,15 @@
testNonGridDefinitionsSetJSValues("(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)", "(foo bar) auto (foo) auto (bar)");
debug("");
- debug("Test getting and setting invalid grid-template-columns and grid-template-rows through JS");
- element = document.createElement("div");
- document.body.appendChild(element);
- element.style.gridTemplateColumns = "'foo'";
- element.style.gridTemplateRows = "'bar";
- shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-template-columns')", "none");
- shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-template-rows')", "none");
+ debug("Test getting invalid grid-template-columns and grid-template-rows set through CSS");
+ testGridDefinitionsValues(document.getElementById("gridWithAutoAsCustomIdent"), "none", "none");
+ testGridDefinitionsValues(document.getElementById("gridWithMinmaxAsCustomIdent"), "none", "none");
+ testGridDefinitionsValues(document.getElementById("gridWithSubgridAsCustomIdent"), "none", "none");
- element = document.createElement("div");
- document.body.appendChild(element);
- element.style.gridTemplateColumns = "'foo' 'bar'";
- element.style.gridTemplateRows = "'bar' 'foo'";
- shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-template-columns')", "none");
- shouldBeEqualToString("getComputedStyle(element, '').getPropertyValue('grid-template-rows')", "none");
+ debug("");
+ debug("Test getting and setting invalid grid-template-columns and grid-template-rows through JS");
+ testGridDefinitionsSetBadJSValues("'foo'", "'bar'");
+ testGridDefinitionsSetBadJSValues("'foo' 'bar'", "'bar' 'foo'");
</script>
</body>
</html>

Powered by Google App Engine
This is Rietveld 408576698