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

Unified Diff: LayoutTests/fast/css-grid-layout/resources/grid-definitions-parsing-utils.js

Issue 398013004: [CSS Grid Layout] Small refactoring in grid-auto-flow-get-set.html test (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch for landing Created 6 years, 5 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
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..edbcd7c8a331102046623de503cb824b4579d0d0 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,20 @@ 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)
+{
+ shouldBe("window.getComputedStyle(" + elementId + ", '').getPropertyValue('grid-auto-flow')", "'" + expectedValue + "'");
+}
+
+function checkGridAutoFlowSetJSValue(newValue, expectedStyleValue, expectedComputedStyleValue)
+{
+ 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);
+}
« no previous file with comments | « LayoutTests/fast/css-grid-layout/grid-auto-flow-get-set-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698