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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set.html

Issue 1798863005: Move some grid-column/grid-row related longhands into CSSPropertyParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Standalone change Created 4 years, 9 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-end-after-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 <link href="resources/grid.css" rel="stylesheet"> 4 <link href="resources/grid.css" rel="stylesheet">
5 <style> 5 <style>
6 .grid { 6 .grid {
7 grid-template-areas: "firstArea secondArea" 7 grid-template-areas: "firstArea secondArea"
8 "thirdArea thirdArea"; 8 "thirdArea thirdArea";
9 } 9 }
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 grid-row-end: span last; 45 grid-row-end: span last;
46 } 46 }
47 .gridItemWithSpanNumberCustomIdent { 47 .gridItemWithSpanNumberCustomIdent {
48 grid-column-end: 2 first span; 48 grid-column-end: 2 first span;
49 grid-row-end: last 3 span; 49 grid-row-end: last 3 span;
50 } 50 }
51 .gridItemWithArea { 51 .gridItemWithArea {
52 grid-column-end: firstArea; 52 grid-column-end: firstArea;
53 grid-row-end: thirdArea; 53 grid-row-end: thirdArea;
54 } 54 }
55 .gridItemWithCSSWideKeyword {
56 grid-column-end: 2 inherit;
57 grid-row-end: 2 initial;
58 }
59 .gridItemWithCSSWideKeyword2 {
60 grid-column-end: 2 unset;
61 grid-row-end: 2 default;
62 }
63 .gridItemWithSpanAuto {
64 grid-column-end: span auto;
65 grid-row-end: auto span;
66 }
67 .gridItemWithOneAuto {
68 grid-column-end: 1 auto;
69 grid-row-end: auto 1;
70 }
71 .gridItemWithSpanAutoOne {
72 grid-column-end: span 1 auto;
73 grid-row-end: span auto 1;
74 }
55 </style> 75 </style>
56 <script src="resources/grid-item-column-row-parsing-utils.js"></script> 76 <script src="resources/grid-item-column-row-parsing-utils.js"></script>
57 <script src="../../resources/js-test.js"></script> 77 <script src="../../resources/js-test.js"></script>
58 </head> 78 </head>
59 <body> 79 <body>
60 <div class="grid"> 80 <div class="grid">
61 <!-- The first has no properties set on it. --> 81 <!-- The first has no properties set on it. -->
62 <div id="gridElement"></div> 82 <div id="gridElement"></div>
63 <div class="gridItemWithPositiveInteger" id="gridItemWithPositiveInteger"></ div> 83 <div class="gridItemWithPositiveInteger" id="gridItemWithPositiveInteger"></ div>
64 <div class="gridItemWithNegativeInteger" id="gridItemWithNegativeInteger"></ div> 84 <div class="gridItemWithNegativeInteger" id="gridItemWithNegativeInteger"></ div>
65 <div class="gridItemWithBeforeSpan" id="gridItemWithBeforeSpan"></div> 85 <div class="gridItemWithBeforeSpan" id="gridItemWithBeforeSpan"></div>
66 <div class="gridItemWithAfterSpan" id="gridItemWithAfterSpan"></div> 86 <div class="gridItemWithAfterSpan" id="gridItemWithAfterSpan"></div>
67 <div class="gridItemWithOnlySpan" id="gridItemWithOnlySpan"></div> 87 <div class="gridItemWithOnlySpan" id="gridItemWithOnlySpan"></div>
68 <div class="gridItemWithAuto" id="gridItemWithAutoElement"></div> 88 <div class="gridItemWithAuto" id="gridItemWithAutoElement"></div>
69 <div class="gridItemWithCustomIdent" id="gridItemWithCustomIdent"></div> 89 <div class="gridItemWithCustomIdent" id="gridItemWithCustomIdent"></div>
70 <div class="gridItemWithNumberCustomIdent" id="gridItemWithNumberCustomIdent "></div> 90 <div class="gridItemWithNumberCustomIdent" id="gridItemWithNumberCustomIdent "></div>
71 <div class="gridItemWithSpanCustomIdent" id="gridItemWithSpanCustomIdentElem ent"></div> 91 <div class="gridItemWithSpanCustomIdent" id="gridItemWithSpanCustomIdentElem ent"></div>
72 <div class="gridItemWithSpanNumberCustomIdent" id="gridItemWithSpanNumberCus tomIdentElement"></div> 92 <div class="gridItemWithSpanNumberCustomIdent" id="gridItemWithSpanNumberCus tomIdentElement"></div>
73 <div class="gridItemWithArea" id="gridItemWithArea"></div> 93 <div class="gridItemWithArea" id="gridItemWithArea"></div>
94 <div class="gridItemWithCSSWideKeyword" id="gridItemWithCSSWideKeyword"></di v>
95 <div class="gridItemWithCSSWideKeyword2" id="gridItemWithCSSWideKeyword2"></ div>
96 <div class="gridItemWithSpanAuto" id="gridItemWithSpanAuto"></div>
97 <div class="gridItemWithOneAuto" id="gridItemWithOneAuto"></div>
98 <div class="gridItemWithSpanAutoOne" id="gridItemWithSpanAutoOne"></div>
74 </div> 99 </div>
75 <script> 100 <script>
76 description('Test that setting and getting grid-column-end and grid-row-end works as expected'); 101 description('Test that setting and getting grid-column-end and grid-row-end works as expected');
77 102
78 debug("Test getting grid-column-end and grid-row-end set through CSS"); 103 debug("Test getting grid-column-end and grid-row-end set through CSS");
79 testColumnRowCSSParsing("gridElement", "auto / auto", "auto / auto"); 104 testColumnRowCSSParsing("gridElement", "auto / auto", "auto / auto");
80 testColumnRowCSSParsing("gridItemWithPositiveInteger", "auto / 10", "auto / 15"); 105 testColumnRowCSSParsing("gridItemWithPositiveInteger", "auto / 10", "auto / 15");
81 testColumnRowCSSParsing("gridItemWithNegativeInteger", "auto / -10", "auto / -15"); 106 testColumnRowCSSParsing("gridItemWithNegativeInteger", "auto / -10", "auto / -15");
82 testColumnRowCSSParsing("gridItemWithBeforeSpan", "auto / span 2", "auto / s pan 9"); 107 testColumnRowCSSParsing("gridItemWithBeforeSpan", "auto / span 2", "auto / s pan 9");
83 testColumnRowCSSParsing("gridItemWithAfterSpan", "auto / span 2", "auto / sp an 9"); 108 testColumnRowCSSParsing("gridItemWithAfterSpan", "auto / span 2", "auto / sp an 9");
84 testColumnRowCSSParsing("gridItemWithOnlySpan", "auto / span 1", "auto / spa n 1"); 109 testColumnRowCSSParsing("gridItemWithOnlySpan", "auto / span 1", "auto / spa n 1");
85 testColumnRowCSSParsing("gridItemWithAutoElement", "auto / auto", "auto / au to"); 110 testColumnRowCSSParsing("gridItemWithAutoElement", "auto / auto", "auto / au to");
86 testColumnRowCSSParsing("gridItemWithCustomIdent", "auto / first", "auto / l ast"); 111 testColumnRowCSSParsing("gridItemWithCustomIdent", "auto / first", "auto / l ast");
87 testColumnRowCSSParsing("gridItemWithNumberCustomIdent", "auto / 2 first", " auto / 3 last"); 112 testColumnRowCSSParsing("gridItemWithNumberCustomIdent", "auto / 2 first", " auto / 3 last");
88 testColumnRowCSSParsing("gridItemWithSpanCustomIdentElement", "auto / span 1 first", "auto / span 1 last"); 113 testColumnRowCSSParsing("gridItemWithSpanCustomIdentElement", "auto / span 1 first", "auto / span 1 last");
89 testColumnRowCSSParsing("gridItemWithSpanNumberCustomIdentElement", "auto / span 2 first", "auto / span 3 last"); 114 testColumnRowCSSParsing("gridItemWithSpanNumberCustomIdentElement", "auto / span 2 first", "auto / span 3 last");
90 testColumnRowCSSParsing("gridItemWithArea", "auto / firstArea", "auto / thir dArea"); 115 testColumnRowCSSParsing("gridItemWithArea", "auto / firstArea", "auto / thir dArea");
116 testColumnRowCSSParsing("gridItemWithCSSWideKeyword", "auto / auto", "auto / auto");
117 testColumnRowCSSParsing("gridItemWithCSSWideKeyword2", "auto / auto", "auto / auto");
118 testColumnRowCSSParsing("gridItemWithSpanAuto", "auto / auto", "auto / auto" );
119 testColumnRowCSSParsing("gridItemWithOneAuto", "auto / auto", "auto / auto") ;
120 testColumnRowCSSParsing("gridItemWithSpanAutoOne", "auto / auto", "auto / au to");
91 121
92 debug(""); 122 debug("");
93 debug("Test the initial value"); 123 debug("Test the initial value");
94 var element = document.createElement("div"); 124 var element = document.createElement("div");
95 document.body.appendChild(element); 125 document.body.appendChild(element);
96 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-end')" , "'auto'"); 126 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-end')" , "'auto'");
97 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column')", "' auto / auto'"); 127 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column')", "' auto / auto'");
98 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row-end')", " 'auto'"); 128 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row-end')", " 'auto'");
99 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'aut o / auto'"); 129 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'aut o / auto'");
100 130
(...skipping 29 matching lines...) Expand all
130 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'aut o / 66'"); 160 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'aut o / 66'");
131 element.style.gridColumnEnd = "auto"; 161 element.style.gridColumnEnd = "auto";
132 element.style.gridRowEnd = "auto"; 162 element.style.gridRowEnd = "auto";
133 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-end')" , "'auto'"); 163 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column-end')" , "'auto'");
134 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column')", "' auto / auto'"); 164 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-column')", "' auto / auto'");
135 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row-end')", " 'auto'"); 165 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row-end')", " 'auto'");
136 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'aut o / auto'"); 166 shouldBe("getComputedStyle(element, '').getPropertyValue('grid-row')", "'aut o / auto'");
137 </script> 167 </script>
138 </body> 168 </body>
139 </html> 169 </html>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/fast/css-grid-layout/grid-item-end-after-get-set-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698