OLD | NEW |
1 <script src="../../resources/js-test.js"></script> | 1 <script src="../../resources/js-test.js"></script> |
2 <style> | 2 <style> |
3 .noposition | 3 .noposition |
4 { | 4 { |
5 background: url("foo.png"); | 5 background: url("foo.png"); |
6 background-size: contain; | 6 background-size: contain; |
7 } | 7 } |
8 .position1 | 8 .position1 |
9 { | 9 { |
10 background: url("foo.png"); | 10 background: url("foo.png"); |
(...skipping 11 matching lines...) Expand all Loading... |
22 background: url("foo.png"); | 22 background: url("foo.png"); |
23 background-position: 1px 1px; | 23 background-position: 1px 1px; |
24 background-size: contain; | 24 background-size: contain; |
25 } | 25 } |
26 </style> | 26 </style> |
27 <script> | 27 <script> |
28 var cssRules = document.styleSheets[1].cssRules; | 28 var cssRules = document.styleSheets[1].cssRules; |
29 | 29 |
30 shouldBe('cssRules.length', '4'); | 30 shouldBe('cssRules.length', '4'); |
31 shouldBeEqualToString('cssRules[0].cssText', '.noposition { background: url("foo
.png") 0% 0% / contain; }'); | 31 shouldBeEqualToString('cssRules[0].cssText', '.noposition { background: url("foo
.png") 0% 0% / contain; }'); |
32 shouldBeEqualToString('cssRules[1].cssText', '.position1 { background: url("foo.
png") 1px 50% / contain; }'); | 32 shouldBeEqualToString('cssRules[1].cssText', '.position1 { background: url("foo.
png") 1px center / contain; }'); |
33 shouldBeEqualToString('cssRules[2].cssText', '.position2 { background: url("foo.
png") 1px / contain; }'); | 33 shouldBeEqualToString('cssRules[2].cssText', '.position2 { background: url("foo.
png") 1px / contain; }'); |
34 shouldBeEqualToString('cssRules[3].cssText', '.position3 { background: url("foo.
png") 1px 1px / contain; }'); | 34 shouldBeEqualToString('cssRules[3].cssText', '.position3 { background: url("foo.
png") 1px 1px / contain; }'); |
35 </script> | 35 </script> |
OLD | NEW |