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

Unified Diff: LayoutTests/fast/css-grid-layout/grid-shorthands-style-format.html

Issue 1132753002: [CSS Grid Layout] Fix grid shorthands CSSOM serialization (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update test expectations for webexposed/nonstable-css-properties.html Created 5 years, 7 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 | « no previous file | LayoutTests/fast/css-grid-layout/grid-shorthands-style-format-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/css-grid-layout/grid-shorthands-style-format.html
diff --git a/LayoutTests/fast/css-grid-layout/grid-shorthands-style-format.html b/LayoutTests/fast/css-grid-layout/grid-shorthands-style-format.html
new file mode 100644
index 0000000000000000000000000000000000000000..719f5326fd6250b67a2bba80ee1a536f27fc9fab
--- /dev/null
+++ b/LayoutTests/fast/css-grid-layout/grid-shorthands-style-format.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<link href="resources/grid.css" rel="stylesheet">
+<div class="grid">
+ <div id="item"></div>
+</div>
+<script src="../../resources/js-test.js"></script>
+<script>
+ description('Test that the format of grid shorthands style uses slashes as expected');
+
+ var item = document.getElementById("item");
+
+ debug("Test grid-column shorthand");
+ item.style.gridColumn = "1";
+ shouldBeEqualToString("item.style.gridColumn", "1 / auto");
+ item.style.gridColumn = "1 / 3";
+ shouldBeEqualToString("item.style.gridColumn", "1 / 3");
+ item.style.gridColumn = "1 / span 2";
+ shouldBeEqualToString("item.style.gridColumn", "1 / span 2");
+ item.style.gridColumn = "foo / bar";
+ shouldBeEqualToString("item.style.gridColumn", "foo / bar");
+ item.style.gridColumn = "foo / span bar";
+ shouldBeEqualToString("item.style.gridColumn", "foo / span bar");
+ item.style.gridColumn = "2 foo / span 3 bar";
+ shouldBeEqualToString("item.style.gridColumn", "2 foo / span 3 bar");
+
+ debug("Test grid-row shorthand");
+ item.style.gridRow = "1";
+ shouldBeEqualToString("item.style.gridRow", "1 / auto");
+ item.style.gridRow = "1 / 3";
+ shouldBeEqualToString("item.style.gridRow", "1 / 3");
+ item.style.gridRow = "1 / span 2";
+ shouldBeEqualToString("item.style.gridRow", "1 / span 2");
+ item.style.gridRow = "foo / bar";
+ shouldBeEqualToString("item.style.gridRow", "foo / bar");
+ item.style.gridRow = "foo / span bar";
+ shouldBeEqualToString("item.style.gridRow", "foo / span bar");
+ item.style.gridRow = "2 foo / span 3 bar";
+ shouldBeEqualToString("item.style.gridRow", "2 foo / span 3 bar");
+
+ debug("Test grid-area shorthand");
+ item.style.gridArea = "1";
+ shouldBeEqualToString("item.style.gridArea", "1 / auto / auto / auto");
+ item.style.gridArea = "1 / 3";
+ shouldBeEqualToString("item.style.gridArea", "1 / 3 / auto / auto");
+ item.style.gridArea = "1 / span 2";
+ shouldBeEqualToString("item.style.gridArea", "1 / span 2 / auto / auto");
+ item.style.gridArea = "foo / foo";
+ shouldBeEqualToString("item.style.gridArea", "foo / foo / foo / foo");
+ item.style.gridArea = "foo / bar";
+ shouldBeEqualToString("item.style.gridArea", "foo / bar / foo / bar");
+ item.style.gridArea = "2 foo / span 3 bar";
+ shouldBeEqualToString("item.style.gridArea", "2 foo / span 3 bar / auto / auto");
+ item.style.gridArea = "1 / 2 / 3";
+ shouldBeEqualToString("item.style.gridArea", "1 / 2 / 3 / auto");
+ item.style.gridArea = "1 / 3 / 2 / 4";
+ shouldBeEqualToString("item.style.gridArea", "1 / 3 / 2 / 4");
+ item.style.gridArea = "1 / span 2 / 1 / span 2";
+ shouldBeEqualToString("item.style.gridArea", "1 / span 2 / 1 / span 2");
+ item.style.gridArea = "foo / bar / baz / qux";
+ shouldBeEqualToString("item.style.gridArea", "foo / bar / baz / qux");
+ item.style.gridArea = "foo / span bar / baz / span qux";
+ shouldBeEqualToString("item.style.gridArea", "foo / span bar / baz / span qux");
+ item.style.gridArea = "2 foo / span 3 bar / 3 baz / span 2 qux";
+ shouldBeEqualToString("item.style.gridArea", "2 foo / span 3 bar / 3 baz / span 2 qux");
+
+</script>
« no previous file with comments | « no previous file | LayoutTests/fast/css-grid-layout/grid-shorthands-style-format-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698