OLD | NEW |
(Empty) | |
| 1 <script src="../../resources/js-test.js"></script> |
| 2 <style> |
| 3 .noposition |
| 4 { |
| 5 background: url("foo.png"); |
| 6 background-size: contain; |
| 7 } |
| 8 .position1 |
| 9 { |
| 10 background: url("foo.png"); |
| 11 background-position: 1px; |
| 12 background-size: contain; |
| 13 } |
| 14 .position2 |
| 15 { |
| 16 background: url("foo.png"); |
| 17 background-position-x: 1px; |
| 18 background-size: contain; |
| 19 } |
| 20 .position3 |
| 21 { |
| 22 background: url("foo.png"); |
| 23 background-position: 1px 1px; |
| 24 background-size: contain; |
| 25 } |
| 26 </style> |
| 27 <script> |
| 28 var cssRules = document.styleSheets[1].cssRules; |
| 29 |
| 30 shouldBe('cssRules.length', '4'); |
| 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; }'); |
| 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; }'); |
| 35 </script> |
OLD | NEW |