blob: 6c32a55b956f2900496ae6430298d1aa71f585a8 [file] [log] [blame]
Test to make sure text-decoration property returns values properly.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Initial value:
PASS e.style.textDecoration is ''
PASS e.style.getPropertyValue('text-decoration') is ''
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is ''
PASS e.style.getPropertyValue('text-decoration-line') is ''
PASS e.style.getPropertyCSSValue('text-decoration-line') is null
PASS computedStyle.textDecoration is 'none'
PASS computedStyle.getPropertyValue('text-decoration') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
PASS computedStyle.textDecorationLine is 'none'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'none'
Initial value (explicit):
PASS e.style.textDecoration is 'initial'
PASS e.style.getPropertyValue('text-decoration') is 'initial'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'initial'
PASS e.style.getPropertyValue('text-decoration-line') is 'initial'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValue]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'initial'
PASS computedStyle.textDecoration is 'none'
PASS computedStyle.getPropertyValue('text-decoration') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
PASS computedStyle.textDecorationLine is 'none'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'none'
Value 'none':
PASS e.style.textDecoration is 'none'
PASS e.style.getPropertyValue('text-decoration') is 'none'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'none'
PASS e.style.getPropertyValue('text-decoration-line') is 'none'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSPrimitiveValue]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'none'
PASS computedStyle.textDecoration is 'none'
PASS computedStyle.getPropertyValue('text-decoration') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
PASS computedStyle.textDecorationLine is 'none'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'none'
Value 'underline':
PASS e.style.textDecoration is 'underline'
PASS e.style.getPropertyValue('text-decoration') is 'underline'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'underline'
PASS e.style.getPropertyValue('text-decoration-line') is 'underline'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'underline'
PASS computedStyle.textDecoration is 'underline'
PASS computedStyle.getPropertyValue('text-decoration') is 'underline'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'underline'
PASS computedStyle.textDecorationLine is 'underline'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'underline'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'underline'
Value 'overline':
PASS e.style.textDecoration is 'overline'
PASS e.style.getPropertyValue('text-decoration') is 'overline'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'overline'
PASS e.style.getPropertyValue('text-decoration-line') is 'overline'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'overline'
PASS computedStyle.textDecoration is 'overline'
PASS computedStyle.getPropertyValue('text-decoration') is 'overline'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'overline'
PASS computedStyle.textDecorationLine is 'overline'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'overline'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'overline'
Value 'line-through':
PASS e.style.textDecoration is 'line-through'
PASS e.style.getPropertyValue('text-decoration') is 'line-through'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'line-through'
PASS e.style.getPropertyValue('text-decoration-line') is 'line-through'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'line-through'
PASS computedStyle.textDecoration is 'line-through'
PASS computedStyle.getPropertyValue('text-decoration') is 'line-through'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'line-through'
PASS computedStyle.textDecorationLine is 'line-through'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'line-through'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'line-through'
Value 'underline overline line-through':
PASS e.style.textDecoration is 'underline overline line-through'
PASS e.style.getPropertyValue('text-decoration') is 'underline overline line-through'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'underline overline line-through'
PASS e.style.getPropertyValue('text-decoration-line') is 'underline overline line-through'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'underline overline line-through'
PASS computedStyle.textDecoration is 'underline overline line-through'
PASS computedStyle.getPropertyValue('text-decoration') is 'underline overline line-through'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'underline overline line-through'
PASS computedStyle.textDecorationLine is 'underline overline line-through'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'underline overline line-through'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'underline overline line-through'
Value 'blink' (valid but ignored):
PASS e.style.textDecoration is 'blink'
PASS e.style.getPropertyValue('text-decoration') is 'blink'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'blink'
PASS e.style.getPropertyValue('text-decoration-line') is 'blink'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'blink'
PASS computedStyle.textDecoration is 'none'
PASS computedStyle.getPropertyValue('text-decoration') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
PASS computedStyle.textDecorationLine is 'none'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'none'
Value '':
PASS e.style.textDecoration is ''
PASS e.style.getPropertyValue('text-decoration') is ''
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is ''
PASS e.style.getPropertyValue('text-decoration-line') is ''
PASS e.style.getPropertyCSSValue('text-decoration-line') is null
PASS computedStyle.textDecoration is 'none'
PASS computedStyle.getPropertyValue('text-decoration') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
PASS computedStyle.textDecorationLine is 'none'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'none'
Parent gets 'underline' value:
PASS e.style.textDecoration is 'underline'
PASS e.style.getPropertyValue('text-decoration') is 'underline'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'underline'
PASS e.style.getPropertyValue('text-decoration-line') is 'underline'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'underline'
PASS computedStyle.textDecoration is 'underline'
PASS computedStyle.getPropertyValue('text-decoration') is 'underline'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'underline'
PASS computedStyle.textDecorationLine is 'underline'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'underline'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'underline'
Ancestor should explicitly inherit value from parent when 'inherit' value is used:
PASS e.style.textDecoration is 'inherit'
PASS e.style.getPropertyValue('text-decoration') is 'inherit'
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is 'inherit'
PASS e.style.getPropertyValue('text-decoration-line') is 'inherit'
PASS e.style.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValue]'
PASS e.style.getPropertyCSSValue('text-decoration-line').cssText is 'inherit'
PASS computedStyle.textDecoration is 'underline'
PASS computedStyle.getPropertyValue('text-decoration') is 'underline'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'underline'
PASS computedStyle.textDecorationLine is 'underline'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'underline'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSValueList]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'underline'
Ancestor should not implicitly inherit value from parent (i.e. when value is void):
PASS e.style.textDecoration is ''
PASS e.style.getPropertyValue('text-decoration') is ''
PASS e.style.getPropertyCSSValue('text-decoration') is null
PASS e.style.textDecorationLine is ''
PASS e.style.getPropertyValue('text-decoration-line') is ''
PASS e.style.getPropertyCSSValue('text-decoration-line') is null
PASS computedStyle.textDecoration is 'none'
PASS computedStyle.getPropertyValue('text-decoration') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration').cssText is 'none'
PASS computedStyle.textDecorationLine is 'none'
PASS computedStyle.getPropertyValue('text-decoration-line') is 'none'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').toString() is '[object CSSPrimitiveValue]'
PASS computedStyle.getPropertyCSSValue('text-decoration-line').cssText is 'none'
PASS successfullyParsed is true
TEST COMPLETE