OLD | NEW |
1 description("This tests checks that the '-webkit-text' and 'text' keywords are \ | 1 description("This tests checks that the '-webkit-text' and 'text' keywords are \ |
2 parsed correctly in the 'background-clip' and '-webkit-background-clip' \ | 2 parsed correctly in the 'background-clip' and '-webkit-background-clip' \ |
3 properties, and that 'background-clip' is parsed correctly in the \ | 3 properties, and that 'background-clip' is parsed correctly in the \ |
4 'background' shorthand."); | 4 'background' shorthand."); |
5 | 5 |
6 function test(declaration, property) | 6 function test(declaration, property) |
7 { | 7 { |
8 var div = document.createElement("div"); | 8 var div = document.createElement("div"); |
9 div.setAttribute("style", declaration); | 9 div.setAttribute("style", declaration); |
10 document.body.appendChild(div); | 10 document.body.appendChild(div); |
11 | 11 |
12 var result = div.style.getPropertyValue(property); | 12 var result = div.style.getPropertyValue(property); |
13 document.body.removeChild(div); | 13 document.body.removeChild(div); |
14 return result; | 14 return result; |
15 } | 15 } |
16 shouldBe('test("background-clip: -webkit-text", "background-clip")', '"-webkit-t
ext"'); | 16 shouldBe('test("background-clip: -webkit-text", "background-clip")', '"-webkit-t
ext"'); |
17 shouldBe('test("background-clip: -webkit-text", "-webkit-background-clip")', 'nu
ll'); | 17 shouldBeEqualToString('test("background-clip: -webkit-text", "-webkit-background
-clip")', ''); |
18 | 18 |
19 shouldBe('test("background-clip: content-box", "background-clip")', '"content-bo
x"'); | 19 shouldBe('test("background-clip: content-box", "background-clip")', '"content-bo
x"'); |
20 shouldBe('test("background-clip: padding-box", "background-clip")', '"padding-bo
x"'); | 20 shouldBe('test("background-clip: padding-box", "background-clip")', '"padding-bo
x"'); |
21 shouldBe('test("background-clip: border-box", "background-clip")', '"border-box"
'); | 21 shouldBe('test("background-clip: border-box", "background-clip")', '"border-box"
'); |
22 | 22 |
23 shouldBe('test("background-clip: text", "background-clip")', 'null'); | 23 shouldBeEqualToString('test("background-clip: text", "background-clip")', ''); |
24 shouldBe('test("background-clip: text", "-webkit-background-clip")', 'null'); | 24 shouldBeEqualToString('test("background-clip: text", "-webkit-background-clip")'
, ''); |
25 | 25 |
26 shouldBe('test("-webkit-background-clip: -webkit-text", "background-clip")', 'nu
ll'); | 26 shouldBeEqualToString('test("-webkit-background-clip: -webkit-text", "background
-clip")', ''); |
27 shouldBe('test("-webkit-background-clip: -webkit-text", "-webkit-background-clip
")', '"-webkit-text"'); | 27 shouldBe('test("-webkit-background-clip: -webkit-text", "-webkit-background-clip
")', '"-webkit-text"'); |
28 | 28 |
29 shouldBe('test("-webkit-background-clip: text", "background-clip")', 'null'); | 29 shouldBeEqualToString('test("-webkit-background-clip: text", "background-clip")'
, ''); |
30 shouldBe('test("-webkit-background-clip: text", "-webkit-background-clip")', '"t
ext"'); | 30 shouldBe('test("-webkit-background-clip: text", "-webkit-background-clip")', '"t
ext"'); |
31 shouldBe('test("background: url() padding-box", "-webkit-background-clip")', 'nu
ll'); | 31 shouldBeEqualToString('test("background: url() padding-box", "-webkit-background
-clip")', ''); |
32 | 32 |
33 shouldBe('test("-webkit-mask: url() ", "background-clip")', 'null'); | 33 shouldBeEqualToString('test("-webkit-mask: url() ", "background-clip")', ''); |
34 shouldBe('test("background: url() ", "background-clip")', '"initial"'); | 34 shouldBe('test("background: url() ", "background-clip")', '"initial"'); |
35 | 35 |
36 shouldBe('test("background: url() padding-box", "background-clip")', '"padding-b
ox"'); | 36 shouldBe('test("background: url() padding-box", "background-clip")', '"padding-b
ox"'); |
37 shouldBe('test("background: url() padding-box border-box", "background-clip")',
'"border-box"'); | 37 shouldBe('test("background: url() padding-box border-box", "background-clip")',
'"border-box"'); |
38 shouldBe('test("background: repeat content-box border-box url() ", "background-c
lip")', '"border-box"'); | 38 shouldBe('test("background: repeat content-box border-box url() ", "background-c
lip")', '"border-box"'); |
39 shouldBe('test("background: padding-box blue content-box url() repeat scroll ",
"background-clip")', '"content-box"'); | 39 shouldBe('test("background: padding-box blue content-box url() repeat scroll ",
"background-clip")', '"content-box"'); |
OLD | NEW |