1 description("Test to make sure text-decoration property returns CSSValueList properly.")
3 var testContainer = document.createElement("div");
4 testContainer.contentEditable = true;
5 document.body.appendChild(testContainer);
7 function expect(desc, actual, expected)
9 if (actual == expected)
12 testPassed(desc+" EXPECTED:"+expected+" ACTUAL:"+actual);
15 testContainer.innerHTML = '<div id="test" style="text-decoration: underline \n line-through;">hello</div>';
17 e = document.getElementById('test');
18 expect('text decoration should be CSSValueList', e.style.getPropertyCSSValue('text-decoration'), "[object CSSValueList]");
19 expect('text decoration should be separated by a single space', e.style.textDecoration, "underline line-through");
20 computedStyle = window.getComputedStyle(e, null);
21 expect('computed style of text decoration should be CSSValueList', computedStyle.getPropertyCSSValue('text-decoration'), "[object CSSValueList]");
22 expect('computed style of text decoration should be separated by a single space', computedStyle.getPropertyCSSValue('text-decoration').cssText, "underline line-through");
24 document.body.removeChild(testContainer);