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

Unified Diff: LayoutTests/animations/interpolation/svg-stroke-width-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-width-interpolation.html
diff --git a/LayoutTests/animations/interpolation/svg-stroke-width-interpolation.html b/LayoutTests/animations/interpolation/svg-stroke-width-interpolation.html
index dbb4827e6bf368971208409cd35f73eddee1f67a..4e87867389912051af5cc58c688b534b8f7b0330 100644
--- a/LayoutTests/animations/interpolation/svg-stroke-width-interpolation.html
+++ b/LayoutTests/animations/interpolation/svg-stroke-width-interpolation.html
@@ -1,10 +1,14 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
+.parent {
+ stroke-width: 30px;
+}
.target {
+ display: inline-block;
stroke: black;
- fill: white;
- stroke-width: 5px;
+ fill: none;
+ stroke-width: 10px;
}
.expected {
stroke: green;
@@ -12,14 +16,66 @@
</style>
<body>
<template id="target-template">
- <svg width="70" height="70">
- <rect x="10" y="10" width="50" height="50"/>
+ <svg width="100" height="100">
+ <rect x="0" y="0" width="100" height="100"/>
</svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'stroke-width',
+ from: '',
+ to: '20px',
+}, [
+ {at: -0.3, is: '7px'},
+ {at: 0, is: '10px'},
+ {at: 0.3, is: '13px'},
+ {at: 0.6, is: '16px'},
+ {at: 1, is: '20px'},
+ {at: 1.5, is: '25px'},
+]);
+
+assertInterpolation({
+ property: 'stroke-width',
+ from: 'initial',
+ to: '20px',
+}, [
+ {at: -0.3, is: '0px'},
+ {at: 0, is: '1px'},
+ {at: 0.3, is: '6.7px'},
+ {at: 0.6, is: '12.4px'},
+ {at: 1, is: '20px'},
+ {at: 1.5, is: '29.5px'},
+]);
+
+assertInterpolation({
+ property: 'stroke-width',
+ from: 'inherit',
+ to: '20px',
+}, [
+ {at: -0.3, is: '33px'},
+ {at: 0, is: '30px'},
+ {at: 0.3, is: '27px'},
+ {at: 0.6, is: '24px'},
+ {at: 1, is: '20px'},
+ {at: 1.5, is: '15px'},
+]);
+
+assertInterpolation({
+ property: 'stroke-width',
+ from: 'unset',
+ to: '20px',
+}, [
+ {at: -0.3, is: '33px'},
+ {at: 0, is: '30px'},
+ {at: 0.3, is: '27px'},
+ {at: 0.6, is: '24px'},
+ {at: 1, is: '20px'},
+ {at: 1.5, is: '15px'},
+]);
+
+assertInterpolation({
+ property: 'stroke-width',
from: '0px',
to: '20px'
}, [

Powered by Google App Engine
This is Rietveld 408576698