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

Side by Side Diff: LayoutTests/fast/css/getComputedStyle/script-tests/getComputedStyle-text-decoration.js

Issue 20751008: Text decorations should be listed as non-inheritable (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fixed typo in getComputedStyle-text-decoration.js Created 7 years, 4 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
OLDNEW
1 function testElementStyle(propertyJS, propertyCSS, type, value) 1 function testElementStyle(propertyJS, propertyCSS, type, value)
2 { 2 {
3 if (type != null) { 3 if (type != null) {
4 shouldBe("e.style." + propertyJS, "'" + value + "'"); 4 shouldBe("e.style." + propertyJS, "'" + value + "'");
5 shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').toString()" , "'" + type + "'"); 5 shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').toString()" , "'" + type + "'");
6 shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').cssText", " '" + value + "'"); 6 shouldBe("e.style.getPropertyCSSValue('" + propertyCSS + "').cssText", " '" + value + "'");
7 } else 7 } else
8 shouldBeNull("e.style.getPropertyCSSValue('" + propertyCSS + "')"); 8 shouldBeNull("e.style.getPropertyCSSValue('" + propertyCSS + "')");
9 } 9 }
10 10
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 testElementStyle("textDecoration", "text-decoration", "[object CSSValueList]", " underline"); 83 testElementStyle("textDecoration", "text-decoration", "[object CSSValueList]", " underline");
84 testComputedStyle("textDecoration", "text-decoration", "[object CSSValueList]", "underline"); 84 testComputedStyle("textDecoration", "text-decoration", "[object CSSValueList]", "underline");
85 debug(''); 85 debug('');
86 86
87 debug("Ancestor should explicitly inherit value from parent when 'inherit' value is used:"); 87 debug("Ancestor should explicitly inherit value from parent when 'inherit' value is used:");
88 e = document.getElementById('test-ancestor'); 88 e = document.getElementById('test-ancestor');
89 testElementStyle("textDecoration", "text-decoration", "[object CSSValue]", "inhe rit"); 89 testElementStyle("textDecoration", "text-decoration", "[object CSSValue]", "inhe rit");
90 testComputedStyle("textDecoration", "text-decoration", "[object CSSValueList]", "underline"); 90 testComputedStyle("textDecoration", "text-decoration", "[object CSSValueList]", "underline");
91 debug(''); 91 debug('');
92 92
93 debug("Ancestor should not implicitly inherit value from parent (i.e. when value is void):");
94 e.style.textDecoration = '';
95 testElementStyle("textDecoration", "text-decoration", null, '');
96 testComputedStyle("textDecoration", "text-decoration", "[object CSSPrimitiveValu e]", "none");
97 debug('');
98
93 document.body.removeChild(testContainer); 99 document.body.removeChild(testContainer);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698