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

Unified Diff: LayoutTests/animations/interpolation/svg-cx-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-cx-interpolation.html
diff --git a/LayoutTests/animations/interpolation/svg-cx-interpolation.html b/LayoutTests/animations/interpolation/svg-cx-interpolation.html
index 68e0027a7beb1079412b99411b3d6a22fa349eb6..27941552892bf8e22e09b22f1b73ccb15aa22a42 100644
--- a/LayoutTests/animations/interpolation/svg-cx-interpolation.html
+++ b/LayoutTests/animations/interpolation/svg-cx-interpolation.html
@@ -1,29 +1,85 @@
<!DOCTYPE html>
<meta charset="UTF-8">
<style>
-svg {
+.parent {
cx: 100px;
}
.target {
- stroke: black;
font-size: 16px;
+ cx: 50px;
}
.expected {
- stroke: green;
+ fill: green;
}
</style>
<body>
<template id="target-template">
- <svg height="200" width="10">
- <circle cx="50%" cy="50%" r="25%" class="target">
+ <svg height="20" width="400">
+ <circle cx="50%" cy="50%" r="10" class="target">
</svg>
</template>
<script src="resources/interpolation-test.js"></script>
<script>
assertInterpolation({
property: 'cx',
+ from: '',
+ to: '20px',
+}, [
+ {at: -0.25, is: '57.5px'},
+ {at: 0, is: '50px'},
+ {at: 0.25, is: '42.5px'},
+ {at: 0.5, is: '35px'},
+ {at: 0.75, is: '27.5px'},
+ {at: 1, is: '20px'},
+ {at: 1.25, is: '12.5px'},
+]);
+
+assertInterpolation({
+ property: 'cx',
+ from: 'initial',
+ to: '20px',
+}, [
+ {at: -0.25, is: '-5px'},
+ {at: 0, is: '0px'},
+ {at: 0.25, is: '5px'},
+ {at: 0.5, is: '10px'},
+ {at: 0.75, is: '15px'},
+ {at: 1, is: '20px'},
+ {at: 1.25, is: '25px'},
+]);
+
+assertInterpolation({
+ property: 'cx',
+ from: 'inherit',
+ to: '20px',
+}, [
+ {at: -0.25, is: '120px'},
+ {at: 0, is: '100px'},
+ {at: 0.25, is: '80px'},
+ {at: 0.5, is: '60px'},
+ {at: 0.75, is: '40px'},
+ {at: 1, is: '20px'},
+ {at: 1.25, is: '0px'},
+]);
+
+assertInterpolation({
+ property: 'cx',
+ from: 'unset',
+ to: '20px',
+}, [
+ {at: -0.25, is: '-5px'},
+ {at: 0, is: '0px'},
+ {at: 0.25, is: '5px'},
+ {at: 0.5, is: '10px'},
+ {at: 0.75, is: '15px'},
+ {at: 1, is: '20px'},
+ {at: 1.25, is: '25px'},
+]);
+
+assertInterpolation({
+ property: 'cx',
from: '-10px',
- to: '10px'
+ to: '10px',
}, [
{at: -0.25, is: '-15px'},
{at: 0, is: '-10px'},
@@ -33,10 +89,11 @@ assertInterpolation({
{at: 1, is: '10px'},
{at: 1.25, is: '15px'},
]);
+
assertInterpolation({
property: 'cx',
from: '-20px',
- to: '30em'
+ to: '30em',
}, [
{at: -0.25, is: '-145px'},
{at: 0, is: '-20px'},
@@ -46,23 +103,11 @@ assertInterpolation({
{at: 1, is: '30em'},
{at: 1.25, is: '605px'},
]);
-assertInterpolation({
- property: 'cx',
- from: 'inherit',
- to: '140px'
-}, [
- {at: -0.25, is: '90px'},
- {at: 0, is: '100px'},
- {at: 0.25, is: '110px'},
- {at: 0.5, is: '120px'},
- {at: 0.75, is: '130px'},
- {at: 1, is: '140px'},
- {at: 1.25, is: '150px'},
-]);
+
assertInterpolation({
property: 'cx',
from: '-10',
- to: '10'
+ to: '10',
}, [
{at: -0.25, is: '-15'},
{at: 0, is: '-10'},

Powered by Google App Engine
This is Rietveld 408576698