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

Unified Diff: LayoutTests/animations/interpolation/svg-flood-color-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-flood-color-interpolation.html
diff --git a/LayoutTests/animations/interpolation/svg-flood-color-interpolation.html b/LayoutTests/animations/interpolation/svg-flood-color-interpolation.html
index 94fa59f9ec3e5f478362f420d6d3f4a64b48ddbe..0533c7fc48fa853056e44111d646e913836a134f 100644
--- a/LayoutTests/animations/interpolation/svg-flood-color-interpolation.html
+++ b/LayoutTests/animations/interpolation/svg-flood-color-interpolation.html
@@ -1,30 +1,91 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
-svg {
- width: 100px;
- height: 100px;
+.container {
+ display: inline-block;
}
-svg rect {
+.parent {
+ flood-color: blue;
+}
+.target {
+ flood-color: orange;
+}
+rect {
fill: black;
filter: url(#test);
}
</style>
<body>
<template id="target-template">
- <svg>
+ <svg width="10" height="100">
<defs>
<filter id="test">
<feFlood class="target"></feFlood>
</filter>
</defs>
- <rect width="100" height="100"></rect>
+ <rect width="10" height="100"></rect>
</svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'flood-color',
+ from: '',
+ to: 'green',
+}, [
+ {at: -5, is: 'rgb(255, 255, 0)'},
+ {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)'},
+]);
+
+assertInterpolation({
+ property: 'flood-color',
+ from: 'initial',
+ to: 'green',
+}, [
+ {at: -5, is: 'rgb(0, 0, 0)'},
+ {at: -0.4, is: 'rgb(0, 0, 0)'},
+ {at: 0, is: 'rgb(0, 0, 0)'},
+ {at: 0.2, is: 'rgb(0, 26, 0)'},
+ {at: 0.6, is: 'rgb(0, 77, 0)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'flood-color',
+ from: 'inherit',
+ to: 'green',
+}, [
+ {at: -5, is: 'rgb(0, 0, 255)'},
+ {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: 'flood-color',
+ from: 'unset',
+ to: 'green',
+}, [
+ {at: -5, is: 'rgb(0, 0, 0)'},
+ {at: -0.4, is: 'rgb(0, 0, 0)'},
+ {at: 0, is: 'rgb(0, 0, 0)'},
+ {at: 0.2, is: 'rgb(0, 26, 0)'},
+ {at: 0.6, is: 'rgb(0, 77, 0)'},
+ {at: 1, is: 'rgb(0, 128, 0)'},
+ {at: 1.5, is: 'rgb(0, 192, 0)'},
+]);
+
+assertInterpolation({
+ property: 'flood-color',
from: 'orange',
to: 'blue'
}, [

Powered by Google App Engine
This is Rietveld 408576698