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

Unified Diff: LayoutTests/animations/interpolation/svg-stroke-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/svg-stroke-interpolation.html
diff --git a/LayoutTests/animations/interpolation/svg-stroke-interpolation.html b/LayoutTests/animations/interpolation/svg-stroke-interpolation.html
index 5bca3f7543c0f44da671f41ca12fe1affcce8594..9305a547aa01e55e7fb1b3146533dc54bd31e69c 100644
--- a/LayoutTests/animations/interpolation/svg-stroke-interpolation.html
+++ b/LayoutTests/animations/interpolation/svg-stroke-interpolation.html
@@ -1,32 +1,83 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
+.container {
+ display: inline-block;
+}
+.parent {
+ stroke: blue;
+}
.target {
- width: 100px;
- height: 100px;
fill: black;
- stroke-width: 20px;
+ stroke-width: 8px;
+ stroke: orange;
color: blue;
}
.expected {
- fill: green;
+ fill: lime;
}
</style>
<body>
<template id="target-template">
-<svg>
-<defs>
-<linearGradient id="gradient">
-<stop offset="0" stop-color="green"/>
-<stop offset="1" stop-color="gold"/>
-</linearGradient>
-</defs>
-<rect x="0" y="0" width="100" height="100">
+ <svg width="10" height="100">
+ <defs>
+ <linearGradient id="gradient" x1="0" x2="0" y1="0" y2="1">
+ <stop offset="0" stop-color="black"/>
+ <stop offset="1" stop-color="blue"/>
+ </linearGradient>
+ </defs>
+ <rect x="0" y="0" width="10" height="100"></rect>
+ </svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'stroke',
+ from: '',
+ to: 'green',
+}, [
+ {at: -0.4, is: 'rgb(255, 180, 0)'},
+ {at: 0, is: 'rgb(255, 165, 0)'},
+ {at: 0.2, is: 'rgb(204, 158, 0)'},
+ {at: 0.6, is: 'rgb(102, 143, 0)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 110, 0)'},
+]);
+
+assertNoInterpolation({
+ property: 'stroke',
+ from: 'initial',
+ to: 'green',
+});
+
+assertInterpolation({
+ property: 'stroke',
+ from: 'inherit',
+ to: 'green',
+}, [
+ {at: -0.4, is: 'rgb(0, 0, 255)'},
+ {at: 0, is: 'rgb(0, 0, 255)'},
+ {at: 0.2, is: 'rgb(0, 26, 204)'},
+ {at: 0.6, is: 'rgb(0, 77, 102)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'stroke',
+ from: 'unset',
+ to: 'green',
+}, [
+ {at: -0.4, is: 'rgb(0, 0, 255)'},
+ {at: 0, is: 'rgb(0, 0, 255)'},
+ {at: 0.2, is: 'rgb(0, 26, 204)'},
+ {at: 0.6, is: 'rgb(0, 77, 102)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'stroke',
from: 'orange',
to: 'blue'
}, [

Powered by Google App Engine
This is Rietveld 408576698