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

Unified Diff: LayoutTests/animations/interpolation/background-image-interpolation.html

Issue 1265873002: Add test coverage for interpolations using CSS wide keywords and neutral keyframes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 5 years, 4 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/animations/interpolation/background-image-interpolation.html
diff --git a/LayoutTests/animations/interpolation/background-image-interpolation.html b/LayoutTests/animations/interpolation/background-image-interpolation.html
index e96ef2723498ba5d969bcf1e9643c0c0a6aee7e7..9e4d97fdad81f9fbc117e2244c679e148f20f38d 100644
--- a/LayoutTests/animations/interpolation/background-image-interpolation.html
+++ b/LayoutTests/animations/interpolation/background-image-interpolation.html
@@ -1,12 +1,17 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
+.parent {
+ background-image: url(../resources/blue-100.png);
+ background-size: 0 0;
+}
.target {
width: 100px;
height: 100px;
display: inline-block;
border: 10px solid black;
background-repeat: no-repeat;
+ background-image: url(../resources/blue-100.png);
}
.expected {
border-color: green;
@@ -16,11 +21,58 @@
<body>
<script src="resources/interpolation-test.js"></script>
<script>
-// Image to image
+// Neutral to image
var from = 'url(../resources/blue-100.png)';
var to = 'url(../resources/green-100.png)';
assertInterpolation({
property: 'background-image',
+ from: '',
+ to: to,
+}, [
+ {at: -0.3, is: from},
+ {at: 0, is: from},
+ {at: 0.3, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.3)'},
+ {at: 0.6, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.6)'},
+ {at: 1, is: to},
+ {at: 1.5, is: to},
+]);
+
+// initial to image
+to = 'url(../resources/green-100.png)';
+assertNoInterpolation({
+ property: 'background-image',
+ from: 'initial',
+ to: to,
+});
+
+// inherit to image
+from = 'url(../resources/blue-100.png)';
+to = 'url(../resources/green-100.png)';
+assertInterpolation({
+ property: 'background-image',
+ from: 'inherit',
+ to: to,
+}, [
+ {at: -0.3, is: from},
+ {at: 0, is: from},
+ {at: 0.3, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.3)'},
+ {at: 0.6, is: '-webkit-cross-fade(' + from + ', ' + to + ', 0.6)'},
+ {at: 1, is: to},
+ {at: 1.5, is: to},
+]);
+
+// unset to image
+assertNoInterpolation({
+ property: 'background-image',
+ from: 'unset',
+ to: to,
+});
+
+// Image to image
+from = 'url(../resources/blue-100.png)';
+to = 'url(../resources/green-100.png)';
+assertInterpolation({
+ property: 'background-image',
from: from,
to: to,
}, [

Powered by Google App Engine
This is Rietveld 408576698