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

Side by Side Diff: LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set.html

Issue 14493016: Fix handling of 'inherit' and 'initial' for grid lines (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Take 2: Forgot the code Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script> 4 <script>
5 if (window.testRunner) 5 if (window.testRunner)
6 testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1); 6 testRunner.overridePreference("WebKitCSSGridLayoutEnabled", 1);
7 </script> 7 </script>
8 <style> 8 <style>
9 .gridItemWithPositiveInteger { 9 .gridItemWithPositiveInteger {
10 -webkit-grid-column: 10; 10 -webkit-grid-column: 10;
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
121 element.style.webkitGridColumn = "auto"; 121 element.style.webkitGridColumn = "auto";
122 element.style.webkitGridRow = "auto"; 122 element.style.webkitGridRow = "auto";
123 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-colum n')", "'auto / auto'"); 123 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-colum n')", "'auto / auto'");
124 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-start ')", "'auto'"); 124 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-start ')", "'auto'");
125 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-end') ", "'auto'"); 125 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-end') ", "'auto'");
126 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') ", "'auto / auto'"); 126 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-row') ", "'auto / auto'");
127 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-befor e')", "'auto'"); 127 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-befor e')", "'auto'");
128 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after ')", "'auto'"); 128 shouldBe("getComputedStyle(element, '').getPropertyValue('-webkit-grid-after ')", "'auto'");
129 129
130 debug(""); 130 debug("");
131 debug("Test getting and setting 'initial' grid-column and grid-row through J S");
132 testColumnRowInitialJSParsing();
133
134 debug("");
135 debug("Test getting and setting 'inherit' grid-column and grid-row through J S");
136 testColumnRowInheritJSParsing("1 / auto", "inherit");
137 testColumnRowInheritJSParsing("inherit", "1 / auto");
138 testColumnRowInheritJSParsing("inherit", "inherit");
139
140 debug("");
131 debug("Test getting and setting invalid grid-column and grid-row through JS" ); 141 debug("Test getting and setting invalid grid-column and grid-row through JS" );
132 testColumnRowInvalidJSParsing("4 5", "5 8"); 142 testColumnRowInvalidJSParsing("4 5", "5 8");
133 testColumnRowInvalidJSParsing("4 /", "5 /"); 143 testColumnRowInvalidJSParsing("4 /", "5 /");
134 testColumnRowInvalidJSParsing("5 / none", "8 / foobar"); 144 testColumnRowInvalidJSParsing("5 / none", "8 / foobar");
135 testColumnRowInvalidJSParsing("5 5", "8 auto"); 145 testColumnRowInvalidJSParsing("5 5", "8 auto");
136 testColumnRowInvalidJSParsing("5 / /", "8 / /"); 146 testColumnRowInvalidJSParsing("5 / /", "8 / /");
137 147
138 // 0 is invalid. 148 // 0 is invalid.
139 testColumnRowInvalidJSParsing("0 / 5", "0 / 6"); 149 testColumnRowInvalidJSParsing("0 / 5", "0 / 6");
140 testColumnRowInvalidJSParsing("6 / 0", "8 / 0"); 150 testColumnRowInvalidJSParsing("6 / 0", "8 / 0");
141 testColumnRowInvalidJSParsing("0", "0"); 151 testColumnRowInvalidJSParsing("0", "0");
142 152
143 testColumnRowInvalidJSParsing("span span / span span", "span span / span spa n"); 153 testColumnRowInvalidJSParsing("span span / span span", "span span / span spa n");
144 154
145 // Negative integer or 0 are invalid. 155 // Negative integer or 0 are invalid.
146 testColumnRowInvalidJSParsing("span -1 / -2 span", "-3 span / span -4"); 156 testColumnRowInvalidJSParsing("span -1 / -2 span", "-3 span / span -4");
147 testColumnRowInvalidJSParsing("0 span / span 0", "span 0 / 0 span"); 157 testColumnRowInvalidJSParsing("0 span / span 0", "span 0 / 0 span");
148 158
149 // Spans for both initial / final values is not allowed. 159 // Spans for both initial / final values is not allowed.
150 testColumnRowInvalidJSParsing("5 span / span 2", "span 4 / 3 span"); 160 testColumnRowInvalidJSParsing("5 span / span 2", "span 4 / 3 span");
151 </script> 161 </script>
152 <script src="../js/resources/js-test-post.js"></script> 162 <script src="../js/resources/js-test-post.js"></script>
153 </body> 163 </body>
154 </html> 164 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/css-grid-layout/grid-item-column-row-get-set-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698