OLD | NEW |
---|---|
(Empty) | |
1 <!DOCTYPE html> | |
2 <script src="../../resources/js-test.js"></script> | |
3 <style> | |
4 .test { | |
5 background: url(resources/dot.png) no-repeat -10px 50px, | |
6 linear-gradient(to bottom, green 0%, lime 100%); | |
7 width: 100px; | |
8 height: 100px; | |
9 visibility: hidden; | |
10 } | |
11 </style> | |
12 <div class="test"></div> | |
13 <script> | |
14 description("Test that background position values do not leak between layers") ; | |
15 var e = document.querySelector('.test'); | |
16 | |
17 var bgPosLayers = getComputedStyle(e).backgroundPosition.split(', '); | |
18 | |
19 var bgPosLayer1 = bgPosLayers[0]; | |
20 shouldBeGreaterThanOrEqual('bgPosLayers[0].search("-10px")', '0'); | |
21 shouldBeGreaterThanOrEqual('bgPosLayers[0].search("50px")', '0'); | |
Julien - ping for review
2014/01/10 13:37:03
Couldn't we just use the explicit position here in
davve
2014/01/10 14:09:49
I like the ability to run (and PASS) the test in F
| |
22 | |
23 var bgPosLayer2 = bgPosLayers[1]; | |
24 shouldBe('bgPosLayers[1].search("-10px")', "-1"); | |
25 shouldBe('bgPosLayers[1].search("50px")', "-1"); | |
26 </script> | |
27 | |
OLD | NEW |