OLD | NEW |
1 description("This tests checks that the '-webkit-text' and 'text' keywords are \ | 1 description("This tests checks that the 'text' keyword is \ |
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"'); | |
17 shouldBeEqualToString('test("background-clip: -webkit-text", "-webkit-background
-clip")', ''); | |
18 | 16 |
19 shouldBe('test("background-clip: content-box", "background-clip")', '"content-bo
x"'); | 17 shouldBe('test("background-clip: content-box", "background-clip")', '"content-bo
x"'); |
20 shouldBe('test("background-clip: padding-box", "background-clip")', '"padding-bo
x"'); | 18 shouldBe('test("background-clip: padding-box", "background-clip")', '"padding-bo
x"'); |
21 shouldBe('test("background-clip: border-box", "background-clip")', '"border-box"
'); | 19 shouldBe('test("background-clip: border-box", "background-clip")', '"border-box"
'); |
22 | 20 |
23 shouldBeEqualToString('test("background-clip: text", "background-clip")', ''); | 21 shouldBeEqualToString('test("background-clip: text", "background-clip")', ''); |
24 shouldBeEqualToString('test("background-clip: text", "-webkit-background-clip")'
, ''); | 22 shouldBeEqualToString('test("background-clip: text", "-webkit-background-clip")'
, ''); |
25 | 23 |
26 shouldBeEqualToString('test("-webkit-background-clip: -webkit-text", "background
-clip")', ''); | |
27 shouldBe('test("-webkit-background-clip: -webkit-text", "-webkit-background-clip
")', '"-webkit-text"'); | |
28 | |
29 shouldBeEqualToString('test("-webkit-background-clip: text", "background-clip")'
, ''); | 24 shouldBeEqualToString('test("-webkit-background-clip: text", "background-clip")'
, ''); |
30 shouldBe('test("-webkit-background-clip: text", "-webkit-background-clip")', '"t
ext"'); | 25 shouldBe('test("-webkit-background-clip: text", "-webkit-background-clip")', '"t
ext"'); |
31 shouldBeEqualToString('test("background: url() padding-box", "-webkit-background
-clip")', ''); | 26 shouldBeEqualToString('test("background: url() padding-box", "-webkit-background
-clip")', ''); |
32 | 27 |
33 shouldBeEqualToString('test("-webkit-mask: url() ", "background-clip")', ''); | 28 shouldBeEqualToString('test("-webkit-mask: url() ", "background-clip")', ''); |
34 shouldBe('test("background: url() ", "background-clip")', '"initial"'); | 29 shouldBe('test("background: url() ", "background-clip")', '"initial"'); |
35 | 30 |
36 shouldBe('test("background: url() padding-box", "background-clip")', '"padding-b
ox"'); | 31 shouldBe('test("background: url() padding-box", "background-clip")', '"padding-b
ox"'); |
37 shouldBe('test("background: url() padding-box border-box", "background-clip")',
'"border-box"'); | 32 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"'); | 33 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"'); | 34 shouldBe('test("background: padding-box blue content-box url() repeat scroll ",
"background-clip")', '"content-box"'); |
OLD | NEW |