Index: LayoutTests/animations/interpolation/svg-stroke-opacity-interpolation.html |
diff --git a/LayoutTests/animations/interpolation/svg-stroke-opacity-interpolation.html b/LayoutTests/animations/interpolation/svg-stroke-opacity-interpolation.html |
index d2cf058cbfbba91a2d7ebe7a2f0173ecf8c61073..8e68b0e13337f111c6974811c64066edf4dd7c8d 100644 |
--- a/LayoutTests/animations/interpolation/svg-stroke-opacity-interpolation.html |
+++ b/LayoutTests/animations/interpolation/svg-stroke-opacity-interpolation.html |
@@ -1,28 +1,83 @@ |
<!DOCTYPE html> |
<meta charset="UTF-8"> |
-<style> |
+ <style> |
+.parent { |
+ stroke-opacity: 0.8; |
+} |
.target { |
- width: 100px; |
- height: 100px; |
display: inline-block; |
- fill: white; |
- stroke: orange; |
+ fill: none; |
+ stroke: black; |
stroke-width: 50px; |
+ stroke-opacity: 0.6; |
} |
.expected { |
margin-right: 15px; |
+ stroke: green; |
} |
</style> |
<body> |
<template id="target-template"> |
-<svg width="100px" height="100px"> |
- <rect x="0" y="0" width="100" height="100" /> |
-</svg> |
+ <svg width="50" height="50"> |
+ <rect x="0" y="0" width="50" height="50" /> |
+ </svg> |
</template> |
<script src="resources/interpolation-test.js"></script> |
<script> |
assertInterpolation({ |
property: 'stroke-opacity', |
+ from: '', |
+ to: '0.4', |
+}, [ |
+ {at: -0.3, is: '0.66'}, |
+ {at: 0, is: '0.6'}, |
+ {at: 0.3, is: '0.54'}, |
+ {at: 0.6, is: '0.48'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.5, is: '0.3'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'stroke-opacity', |
+ from: 'initial', |
+ to: '0.4', |
+}, [ |
+ {at: -0.3, is: '1'}, |
+ {at: 0, is: '1'}, |
+ {at: 0.3, is: '0.82'}, |
+ {at: 0.6, is: '0.64'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.5, is: '0.1'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'stroke-opacity', |
+ from: 'inherit', |
+ to: '0.4', |
+}, [ |
+ {at: -0.3, is: '0.92'}, |
+ {at: 0, is: '0.8'}, |
+ {at: 0.3, is: '0.68'}, |
+ {at: 0.6, is: '0.56'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.5, is: '0.2'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'stroke-opacity', |
+ from: 'unset', |
+ to: '0.4', |
+}, [ |
+ {at: -0.3, is: '0.92'}, |
+ {at: 0, is: '0.8'}, |
+ {at: 0.3, is: '0.68'}, |
+ {at: 0.6, is: '0.56'}, |
+ {at: 1, is: '0.4'}, |
+ {at: 1.5, is: '0.2'}, |
+]); |
+ |
+assertInterpolation({ |
+ property: 'stroke-opacity', |
from: '0', |
to: '1' |
}, [ |