Index: LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js |
diff --git a/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js b/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js |
index ca22800a8238f2fd6582717f2418b9deab6c9b06..55348bf71d19bca49d916c606ebc0d7ac5cf15f6 100644 |
--- a/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js |
+++ b/LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js |
@@ -35,13 +35,25 @@ function checkGridDefinitionsSetJSValues(useGrid, columnValue, rowValue, compute |
document.body.removeChild(element); |
} |
-function testGridDefinitionsSetBadJSValues(columnValue, rowValue) |
+function checkGridDefinitionsSetBadJSValues(useGrid, columnValue, rowValue) |
{ |
window.element = document.createElement("div"); |
document.body.appendChild(element); |
+ if (useGrid) |
+ element.style.display = "grid"; |
element.style.gridTemplateColumns = columnValue; |
element.style.gridTemplateRows = rowValue; |
// We can't use testSetJSValues as element.style.gridTemplateRows returns "". |
testGridDefinitionsValues(element, "none", "none"); |
document.body.removeChild(element); |
-} |
+} |
+ |
+function testGridDefinitionsSetBadJSValues(columnValue, rowValue) |
+{ |
+ checkGridDefinitionsSetBadJSValues(true, columnValue, rowValue); |
+} |
+ |
+function testNonGridDefinitionsSetBadJSValues(columnValue, rowValue) |
+{ |
+ checkGridDefinitionsSetBadJSValues(false, columnValue, rowValue); |
+} |