Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: LayoutTests/fast/backgrounds/multiple-backgrounds-initial-values.html

Issue 128203003: Teach mapFill{X,Y}Position about initial values to individual background layers (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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>
+

Powered by Google App Engine
This is Rietveld 408576698