OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../../resources/js-test.js"></script> | 4 <script src="../../../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <div id="test"></div> | 7 <div id="test"></div> |
8 <div id="ancestor"><div id="child"></div></div> | 8 <div id="ancestor"><div id="child"></div></div> |
9 | 9 |
10 <script> | 10 <script> |
11 function testElementStyle(value) | 11 function testElementStyle(value) |
12 { | 12 { |
13 shouldBe("element.style.textJustify", "'" + value + "'"); | 13 shouldBe("element.style.textJustify", "'" + value + "'"); |
14 shouldBe("element.style.getPropertyCSSValue('text-justify').cssText", "'"
+ value + "'"); | |
15 } | 14 } |
16 | 15 |
17 function testComputedStyle(value) | 16 function testComputedStyle(value) |
18 { | 17 { |
19 computedStyle = window.getComputedStyle(element, null); | 18 computedStyle = window.getComputedStyle(element, null); |
20 shouldBe("computedStyle.textJustify", "'" + value + "'"); | 19 shouldBe("computedStyle.textJustify", "'" + value + "'"); |
21 shouldBe("computedStyle.getPropertyCSSValue('text-justify').cssText", "'"
+ value + "'"); | |
22 } | 20 } |
23 | 21 |
24 function valueSettingTest(value) | 22 function valueSettingTest(value) |
25 { | 23 { |
26 debug("Value '" + value + "':"); | 24 debug("Value '" + value + "':"); |
27 element.style.textJustify = value; | 25 element.style.textJustify = value; |
28 testElementStyle(value); | 26 testElementStyle(value); |
29 testComputedStyle(value); | 27 testComputedStyle(value); |
30 debug(''); | 28 debug(''); |
31 } | 29 } |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 computedValueSettingTest('inherit', 'none'); | 94 computedValueSettingTest('inherit', 'none'); |
97 computedValueSettingTest('inherit', 'distribute'); | 95 computedValueSettingTest('inherit', 'distribute'); |
98 computedValueSettingTest('initial', 'auto'); | 96 computedValueSettingTest('initial', 'auto'); |
99 | 97 |
100 ownValueTest("inter-word", "distribute"); | 98 ownValueTest("inter-word", "distribute"); |
101 ownValueTest("none", "inter-word"); | 99 ownValueTest("none", "inter-word"); |
102 </script> | 100 </script> |
103 </body> | 101 </body> |
104 | 102 |
105 </html> | 103 </html> |
OLD | NEW |