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

Unified Diff: LayoutTests/animations/interpolation/svg-flood-opacity-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-opacity-interpolation.html
diff --git a/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html b/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html
index 05f69d429328bc75b16fa9087d45e2a1d2eab795..ed96ec4ed11c2e40595395512f066f2167e808c3 100644
--- a/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html
+++ b/LayoutTests/animations/interpolation/svg-flood-opacity-interpolation.html
@@ -1,31 +1,94 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
+.container {
+ display: inline-block;
+}
+.parent {
+ flood-opacity: 0.8;
+}
+.target {
+ flood-opacity: 0.6;
+}
svg {
- width: 100px;
- height: 100px;
- background: red;
+ background: black;
}
-svg rect {
+rect {
fill: black;
filter: url(#test);
}
</style>
<body>
<template id="target-template">
- <svg>
+ <svg width="10" height="100">
<defs>
<filter id="test">
- <feFlood x="10" y="10" width="80" height="80" flood-color="blue" class="target" />
+ <feFlood x="0" y="0" width="10" height="100" flood-color="blue" class="target" />
</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-opacity',
+ from: '',
+ to: '0.4',
+}, [
+ {at: -1, is: '0.8'},
+ {at: -0.25, is: '0.65'},
+ {at: 0, is: '0.6'},
+ {at: 0.25, is: '0.55'},
+ {at: 1, is: '0.4'},
+ {at: 1.25, is: '0.35'},
+ {at: 2, is: '0.2'},
+]);
+
+assertInterpolation({
+ property: 'flood-opacity',
+ from: 'initial',
+ to: '0.4',
+}, [
+ {at: -1, is: '1'},
+ {at: -0.25, is: '1'},
+ {at: 0, is: '1'},
+ {at: 0.25, is: '0.85'},
+ {at: 1, is: '0.4'},
+ {at: 1.25, is: '0.25'},
+ {at: 2, is: '0'},
+]);
+
+assertInterpolation({
+ property: 'flood-opacity',
+ from: 'inherit',
+ to: '0.4',
+}, [
+ {at: -1, is: '1'},
+ {at: -0.25, is: '0.9'},
+ {at: 0, is: '0.8'},
+ {at: 0.25, is: '0.7'},
+ {at: 1, is: '0.4'},
+ {at: 1.25, is: '0.3'},
+ {at: 2, is: '0'},
+]);
+
+assertInterpolation({
+ property: 'flood-opacity',
+ from: 'unset',
+ to: '0.4',
+}, [
+ {at: -1, is: '1'},
+ {at: -0.25, is: '1'},
+ {at: 0, is: '1'},
+ {at: 0.25, is: '0.85'},
+ {at: 1, is: '0.4'},
+ {at: 1.25, is: '0.25'},
+ {at: 2, is: '0'},
+]);
+
+assertInterpolation({
+ property: 'flood-opacity',
from: '0.25',
to: '0.75'
}, [

Powered by Google App Engine
This is Rietveld 408576698