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

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

Issue 2746453005: [css-align] Adapt self-alignment properties to the new baseline syntax (Closed)
Patch Set: More layout tests fixes. Created 3 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
OLDNEW
1 function checkValues(element, property, propertyID, value, computedValue) 1 function checkValues(element, property, propertyID, value, computedValue)
2 { 2 {
3 window.element = element; 3 window.element = element;
4 var elementID = element.id || "element"; 4 var elementID = element.id || "element";
5 assert_equals(eval('element.style.' + property), value, property + ' specifi ed value is not what it should..'); 5 assert_equals(eval('element.style.' + property), value, property + ' specifi ed value is not what it should.');
6 assert_equals(eval("window.getComputedStyle(" + elementID + ", '').getProper tyValue('" + propertyID + "')"), computedValue, property + " is not what is shou ld."); 6 assert_equals(eval("window.getComputedStyle(" + elementID + ", '').getProper tyValue('" + propertyID + "')"), computedValue, property + " is not what is shou ld.");
7 } 7 }
8 8
9 function checkBadValues(element, property, propertyID, value) 9 function checkBadValues(element, property, propertyID, value)
10 { 10 {
11 var elementID = element.id || "element"; 11 var elementID = element.id || "element";
12 var initialValue = eval("window.getComputedStyle(" + elementID + " , '').get PropertyValue('" + propertyID + "')"); 12 var initialValue = eval("window.getComputedStyle(" + elementID + " , '').get PropertyValue('" + propertyID + "')");
13 element.style[property] = value; 13 element.style[property] = value;
14 checkValues(element, property, propertyID, "", initialValue); 14 checkValues(element, property, propertyID, "", initialValue);
15 } 15 }
(...skipping 30 matching lines...) Expand all
46 parentElement.appendChild(element); 46 parentElement.appendChild(element);
47 checkValues(element, property, propertyID, "", value); 47 checkValues(element, property, propertyID, "", value);
48 } 48 }
49 49
50 function checkSupportedValues(elementID, property) 50 function checkSupportedValues(elementID, property)
51 { 51 {
52 var value = eval("window.getComputedStyle(" + elementID + " , '').getPropert yValue('" + property + "')"); 52 var value = eval("window.getComputedStyle(" + elementID + " , '').getPropert yValue('" + property + "')");
53 var value1 = eval("window.getComputedStyle(" + elementID + " , '')"); 53 var value1 = eval("window.getComputedStyle(" + elementID + " , '')");
54 shouldBeTrue("CSS.supports('" + property + "', '" + value + "')"); 54 shouldBeTrue("CSS.supports('" + property + "', '" + value + "')");
55 } 55 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698