| 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("textDecorationLine", "text-decoration-line", "[object CSSValue
List]", "underline"); | 83 testElementStyle("textDecorationLine", "text-decoration-line", "[object CSSValue
List]", "underline"); |
| 84 testComputedStyle("textDecorationLine", "text-decoration-line", "[object CSSValu
eList]", "underline"); | 84 testComputedStyle("textDecorationLine", "text-decoration-line", "[object CSSValu
eList]", "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("textDecorationLine", "text-decoration-line", "[object CSSValue
]", "inherit"); | 89 testElementStyle("textDecorationLine", "text-decoration-line", "[object CSSValue
]", "inherit"); |
| 90 testComputedStyle("textDecorationLine", "text-decoration-line", "[object CSSValu
eList]", "underline"); | 90 testComputedStyle("textDecorationLine", "text-decoration-line", "[object CSSValu
eList]", "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.textDecorationLine = ''; |
| 95 testElementStyle("textDecorationLine", "text-decoration-line", null, ''); |
| 96 testComputedStyle("textDecorationLine", "text-decoration-line", "[object CSSPrim
itiveValue]", "none"); |
| 97 debug(''); |
| 98 |
| 93 document.body.removeChild(testContainer); | 99 document.body.removeChild(testContainer); |
| OLD | NEW |