| OLD | NEW |
| 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 Loading... |
| 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); |
| OLD | NEW |