OLD | NEW |
1 description("Test the setting of the -webkit-image-set function."); | 1 description("Test the setting of the -webkit-image-set function."); |
2 | 2 |
3 function testComputedStyle(property, fullRule) | 3 function testComputedStyle(property, fullRule) |
4 { | 4 { |
5 var div = document.createElement("div"); | 5 var div = document.createElement("div"); |
6 document.body.appendChild(div); | 6 document.body.appendChild(div); |
7 div.setAttribute("style", property + ": " + fullRule); | 7 div.setAttribute("style", property + ": " + fullRule); |
8 var computedValue = div.style.background; | 8 var computedValue = div.style.backgroundImage; |
9 document.body.removeChild(div); | 9 document.body.removeChild(div); |
10 return computedValue; | 10 return computedValue; |
11 } | 11 } |
12 | 12 |
13 function testImageSetRule(description, property, rule, expected) | 13 function testImageSetRule(description, property, rule, expected) |
14 { | 14 { |
15 debug(""); | 15 debug(""); |
16 debug(description + " : " + rule); | 16 debug(description + " : " + rule); |
17 | 17 |
18 var fullRule = "-webkit-image-set(" + rule + ")"; | 18 var fullRule = "-webkit-image-set(" + rule + ")"; |
(...skipping 17 matching lines...) Expand all Loading... |
36 "url(http://www.webkit.org/c) 1x, url(http://www.webkit.org/b) 2
x, url(http://www.webkit.org/a) 1x"); | 36 "url(http://www.webkit.org/c) 1x, url(http://www.webkit.org/b) 2
x, url(http://www.webkit.org/a) 1x"); |
37 | 37 |
38 testImageSetRule("Fractional values for background-image", | 38 testImageSetRule("Fractional values for background-image", |
39 "background-image", | 39 "background-image", |
40 "url(http://www.webkit.org/c) 0.2x, url(http://www.webkit.org/b)
2.3x, url(http://www.webkit.org/a) 12.3456x"); | 40 "url(http://www.webkit.org/c) 0.2x, url(http://www.webkit.org/b)
2.3x, url(http://www.webkit.org/a) 12.3456x"); |
41 | 41 |
42 // FIXME: We should also be testing the behavior of negative values somewhere, b
ut it's currently | 42 // FIXME: We should also be testing the behavior of negative values somewhere, b
ut it's currently |
43 // broken. http://wkb.ug/100132 | 43 // broken. http://wkb.ug/100132 |
44 | 44 |
45 successfullyParsed = true; | 45 successfullyParsed = true; |
OLD | NEW |