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

Side by Side Diff: LayoutTests/fast/alignment/resources/alignment-parsing-utils.js

Issue 333423005: [CSS Grid Layout] Implement 'justify-items' parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Patch rebased. 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 unified diff | Download patch
OLDNEW
(Empty)
1 function checkValues(element, property, propertyID, value, computedValue)
2 {
3 window.element = element;
4 var elementID = element.id || "element";
5 shouldBeEqualToString("element.style." + property, value);
6 shouldBeEqualToString("window.getComputedStyle(" + elementID + ", '').getPro pertyValue('" + propertyID + "')", computedValue);
7 }
8
9 function checkBadValues(element, property, propertyID, value)
10 {
11 element.style.justifyItems = value;
12 checkValues(element, property, propertyID, "", "start");
13 }
14
15 function checkInitialValues(element, property, propertyID, display)
16 {
17 var initial = "start";
18 if (display == "grid" || display == "flex") {
19 element.style.display = display;
20 initial = "stretch";
21 }
22
23 element.style.justifyItems = "center";
24 checkValues(element, property, propertyID, "center", "center");
25 element.style.justifyItems = "initial";
26 checkValues(element, property, propertyID, "initial", initial);
27 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698