tizen beta release
[framework/web/webkit-efl.git] / LayoutTests / fast / css / getComputedStyle / script-tests / getComputedStyle-text-decoration.js
1 description("Test to make sure text-decoration property returns CSSValueList properly.")
2
3 var testContainer = document.createElement("div");
4 testContainer.contentEditable = true;
5 document.body.appendChild(testContainer);
6
7 function expect(desc, actual, expected)
8 {
9     if (actual == expected)
10         testPassed(desc);
11     else
12         testPassed(desc+" EXPECTED:"+expected+" ACTUAL:"+actual);
13 }
14
15 testContainer.innerHTML = '<div id="test" style="text-decoration: underline    \n line-through;">hello</div>';
16
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");
23
24 document.body.removeChild(testContainer);