Index: LayoutTests/fast/backgrounds/multiple-backgrounds-initial-values.html |
diff --git a/LayoutTests/fast/backgrounds/multiple-backgrounds-initial-values.html b/LayoutTests/fast/backgrounds/multiple-backgrounds-initial-values.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..5a751a01c961da09096ff339bba0332156c32758 |
--- /dev/null |
+++ b/LayoutTests/fast/backgrounds/multiple-backgrounds-initial-values.html |
@@ -0,0 +1,27 @@ |
+<!DOCTYPE html> |
+<script src="../../resources/js-test.js"></script> |
+<style> |
+.test { |
+ background: url(resources/dot.png) no-repeat -10px 50px, |
+ linear-gradient(to bottom, green 0%, lime 100%); |
+ width: 100px; |
+ height: 100px; |
+ visibility: hidden; |
+} |
+</style> |
+<div class="test"></div> |
+<script> |
+ description("Test that background position values do not leak between layers"); |
+ var e = document.querySelector('.test'); |
+ |
+ var bgPosLayers = getComputedStyle(e).backgroundPosition.split(', '); |
+ |
+ var bgPosLayer1 = bgPosLayers[0]; |
+ shouldBeGreaterThanOrEqual('bgPosLayers[0].search("-10px")', '0'); |
+ 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
|
+ |
+ var bgPosLayer2 = bgPosLayers[1]; |
+ shouldBe('bgPosLayers[1].search("-10px")', "-1"); |
+ shouldBe('bgPosLayers[1].search("50px")', "-1"); |
+</script> |
+ |