Chromium Code Reviews| 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..f970cfdad5d124f4927db5705b634f19b997db94 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 |
| @@ -44,4 +44,18 @@ function testGridDefinitionsSetBadJSValues(columnValue, rowValue) |
| // We can't use testSetJSValues as element.style.gridTemplateRows returns "". |
| testGridDefinitionsValues(element, "none", "none"); |
| document.body.removeChild(element); |
| -} |
| +} |
| + |
| +function checkGridAutoFlowSetCSSValue(elementId, expectedValue) { |
|
Julien - ping for review
2014/07/22 17:44:12
Blink style puts the curly brace on the next line.
|
| + shouldBe("window.getComputedStyle(" + elementId + ", '').getPropertyValue('grid-auto-flow')", "'" + expectedValue + "'"); |
| +} |
| + |
| +function checkGridAutoFlowSetJSValue(newValue, expectedStyleValue, expectedComputedStyleValue) { |
|
Julien - ping for review
2014/07/22 17:44:12
Ditto.
|
| + element = document.createElement("div"); |
| + document.body.appendChild(element); |
| + if (newValue) |
| + element.style.gridAutoFlow = newValue; |
| + shouldBe("element.style.gridAutoFlow", "'" + expectedStyleValue + "'"); |
| + shouldBe("window.getComputedStyle(element, '').getPropertyValue('grid-auto-flow')", "'" + expectedComputedStyleValue + "'"); |
| + document.body.removeChild(element); |
| +} |