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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/alignment/parse-place-items.html

Issue 2455093002: [css-align] Don't resolve 'auto' values for computed style. (Closed)
Patch Set: Removed some outdated comments. Created 3 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <style> 4 <style>
5 #placeItemsNormal { 5 #placeItemsNormal {
6 place-items: normal; 6 place-items: normal;
7 } 7 }
8 #placeItemsCenterAuto { 8 #placeItemsCenterAuto {
9 place-items: center auto; 9 place-items: center auto;
10 } 10 }
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 }, "Test setting 'start end left' as incorrect value through CSS."); 217 }, "Test setting 'start end left' as incorrect value through CSS.");
218 218
219 test(function() { 219 test(function() {
220 checkPlaceItemsValuesJS("center", "center", "center"); 220 checkPlaceItemsValuesJS("center", "center", "center");
221 checkPlaceItemsValuesJS("center start", "center", "start"); 221 checkPlaceItemsValuesJS("center start", "center", "start");
222 checkPlaceItemsValuesJS("self-start end", "self-start", "end"); 222 checkPlaceItemsValuesJS("self-start end", "self-start", "end");
223 checkPlaceItemsValuesJS("normal end", "normal", "end"); 223 checkPlaceItemsValuesJS("normal end", "normal", "end");
224 }, "Test setting values through JS."); 224 }, "Test setting values through JS.");
225 225
226 test(function() { 226 test(function() {
227 checkPlaceItemsValuesBadJS("auto normal", "normal", "normal"); 227 checkPlaceItemsValuesBadJS("auto normal");
228 checkPlaceItemsValuesBadJS("space-between", "normal", "normal"); 228 checkPlaceItemsValuesBadJS("space-between");
229 checkPlaceItemsValuesBadJS("center safe", "normal", "normal"); 229 checkPlaceItemsValuesBadJS("center safe");
230 checkPlaceItemsValuesBadJS("center self-start center", "normal", "normal"); 230 checkPlaceItemsValuesBadJS("center self-start center");
231 checkPlaceItemsValuesBadJS("asrt", "normal", "normal"); 231 checkPlaceItemsValuesBadJS("asrt", "normal");
232 checkPlaceItemsValuesBadJS("auto", "normal", "normal"); 232 checkPlaceItemsValuesBadJS("auto", "normal");
233 checkPlaceItemsValuesBadJS("10px", "normal", "normal"); 233 checkPlaceItemsValuesBadJS("10px", "normal");
234 checkPlaceItemsValuesBadJS("stretch safe", "normal", "normal"); 234 checkPlaceItemsValuesBadJS("stretch safe");
235 checkPlaceItemsValuesBadJS("self-start start end", "normal", "normal"); 235 checkPlaceItemsValuesBadJS("self-start start end");
236 checkPlaceItemsValuesBadJS("", "normal", "normal"); 236 checkPlaceItemsValuesBadJS("");
237 }, "Test setting incorrect values through JS."); 237 }, "Test setting incorrect values through JS.");
238 238
239 test(function() { 239 test(function() {
240 element = document.createElement("div"); 240 element = document.createElement("div");
241 document.body.appendChild(element); 241 document.body.appendChild(element);
242 checkValues(element, "placeItems", "place-items", "", "normal normal"); 242 checkValues(element, "placeItems", "place-items", "", "normal normal");
243 element.style.placeItems = "center"; 243 element.style.placeItems = "center";
244 checkPlaceItemsValues(element, "center", "center", "center"); 244 checkPlaceItemsValues(element, "center", "center", "center");
245 element.style.placeItems = "initial"; 245 element.style.placeItems = "initial";
246 checkValues(element, "placeItems", "place-items", "initial", "normal normal"); 246 checkValues(element, "placeItems", "place-items", "initial", "normal normal");
247 checkPlaceItemsValues(element, "initial", "normal", "normal"); 247 checkPlaceItemsValues(element, "initial", "normal", "normal");
248 }, "Test the 'initial' value of the place-items shorthand and its longhand prope rties' Computed value"); 248 }, "Test the 'initial' value of the place-items shorthand and its longhand prope rties' Computed value");
249 249
250 test(function() { 250 test(function() {
251 document.body.style.placeItems = "start"; 251 document.body.style.placeItems = "start";
252 var anotherElement = document.createElement("div"); 252 var anotherElement = document.createElement("div");
253 document.body.appendChild(anotherElement); 253 document.body.appendChild(anotherElement);
254 checkPlaceItemsValues(anotherElement, "", "normal", "normal"); 254 checkPlaceItemsValues(anotherElement, "", "normal", "normal");
255 anotherElement.style.placeItems = "inherit"; 255 anotherElement.style.placeItems = "inherit";
256 checkPlaceItemsValues(anotherElement, "inherit", "start", "start"); 256 checkPlaceItemsValues(anotherElement, "inherit", "start", "start");
257 }, "Test the 'inherit' value of the place-items shorthand and its longhand prope rties' Computed value"); 257 }, "Test the 'inherit' value of the place-items shorthand and its longhand prope rties' Computed value");
258 </script> 258 </script>
259 </body> 259 </body>
260 </html> 260 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698