OLD | NEW |
1 description('Tests parsing of webkit-region-overflow property'); | 1 description('Tests parsing of webkit-region-fragment property'); |
2 | 2 |
3 var webkitRegionOverflowProperty = "-webkit-region-overflow"; | 3 var webkitRegionFragmentProperty = "-webkit-region-fragment"; |
4 | 4 |
5 function testCSSText(declaration) { | 5 function testCSSText(declaration) { |
6 var div = document.createElement("div"); | 6 var div = document.createElement("div"); |
7 div.setAttribute("style", declaration); | 7 div.setAttribute("style", declaration); |
8 return div.style.webkitRegionOverflow; | 8 return div.style.webkitRegionFragment; |
9 } | 9 } |
10 | 10 |
11 function testComputedStyle(declaration) { | 11 function testComputedStyle(declaration) { |
12 var div = document.createElement("div"); | 12 var div = document.createElement("div"); |
13 document.body.appendChild(div); | 13 document.body.appendChild(div); |
14 div.style.setProperty(webkitRegionOverflowProperty, declaration); | 14 div.style.setProperty(webkitRegionFragmentProperty, declaration); |
15 | 15 |
16 var contentComputedValue = getComputedStyle(div).getPropertyValue(webkitRegi
onOverflowProperty); | 16 var contentComputedValue = getComputedStyle(div).getPropertyValue(webkitRegi
onFragmentProperty); |
17 document.body.removeChild(div); | 17 document.body.removeChild(div); |
18 return contentComputedValue; | 18 return contentComputedValue; |
19 } | 19 } |
20 | 20 |
21 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': auto")
', "auto"); | 21 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': auto")
', "auto"); |
22 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': initia
l")', "initial"); | 22 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': initia
l")', "initial"); |
23 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': inheri
t")', "inherit"); | 23 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': inheri
t")', "inherit"); |
24 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': break"
)', "break"); | 24 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': break"
)', "break"); |
25 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 0")',
""); | 25 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': 0")',
""); |
26 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': -1")',
""); | 26 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': -1")',
""); |
27 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 12.5")
', ""); | 27 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': 12.5")
', ""); |
28 shouldBeEqualToString('testCSSText("' + webkitRegionOverflowProperty + ': 1px")'
, ""); | 28 shouldBeEqualToString('testCSSText("' + webkitRegionFragmentProperty + ': 1px")'
, ""); |
29 | 29 |
30 shouldBeEqualToString('testComputedStyle("auto")', "auto"); | 30 shouldBeEqualToString('testComputedStyle("auto")', "auto"); |
31 shouldBeEqualToString('testComputedStyle("initial")', "auto"); | 31 shouldBeEqualToString('testComputedStyle("initial")', "auto"); |
32 shouldBeEqualToString('testComputedStyle("inherit")', "auto"); | 32 shouldBeEqualToString('testComputedStyle("inherit")', "auto"); |
33 shouldBeEqualToString('testComputedStyle("break")', "break"); | 33 shouldBeEqualToString('testComputedStyle("break")', "break"); |
34 shouldBeEqualToString('testComputedStyle("0")', "auto"); | 34 shouldBeEqualToString('testComputedStyle("0")', "auto"); |
35 shouldBeEqualToString('testComputedStyle("-1")', "auto"); | 35 shouldBeEqualToString('testComputedStyle("-1")', "auto"); |
36 shouldBeEqualToString('testComputedStyle("12.5")', "auto"); | 36 shouldBeEqualToString('testComputedStyle("12.5")', "auto"); |
37 shouldBeEqualToString('testComputedStyle("1px")', "auto"); | 37 shouldBeEqualToString('testComputedStyle("1px")', "auto"); |
OLD | NEW |