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

Unified Diff: third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition.html

Issue 1441853002: Web Animations: Add SVGPathInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_svgNumberListInterpolationType
Patch Set: Rebased Created 5 years 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition.html
diff --git a/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition.html b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..b06f1afde22bb66cb6739bde902a82fe395860f3
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition.html
@@ -0,0 +1,108 @@
+<!DOCTYPE html>
+<body>
+<template id="target-template">
+<svg width="90" height="90">
+<path class="target" />
+</svg>
+</template>
+<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
+<script>
+'use strict';
+
+// SVG Paths always replace.
+
+assertAttributeInterpolation({
+ property: 'd',
+ underlying: 'M 10 10 H 20',
+ from: 'M 20 30 L 40 50',
+ fromComposite: 'add',
+ to: 'M 30 40 L 50 60',
+ toComposite: 'add',
+}, [
+ {at: -0.4, is: 'M 16 26 L 36 46'},
+ {at: 0, is: 'M 20 30 L 40 50'},
+ {at: 0.2, is: 'M 22 32 L 42 52'},
+ {at: 0.6, is: 'M 26 36 L 46 56'},
+ {at: 1, is: 'M 30 40 L 50 60'},
+ {at: 1.4, is: 'M 34 44 L 54 64'},
+]);
+
+assertAttributeInterpolation({
+ property: 'd',
+ underlying: 'M 10 10 H 20',
+ from: 'M 20 30 L 40 50',
+ fromComposite: 'add',
+ to: 'M 30 40 H 50',
+ toComposite: 'add',
+}, [
+ {at: -0.4, is: 'M 20 30 L 40 50'},
+ {at: 0, is: 'M 20 30 L 40 50'},
+ {at: 0.2, is: 'M 20 30 L 40 50'},
+ {at: 0.6, is: 'M 30 40 H 50'},
+ {at: 1, is: 'M 30 40 H 50'},
+ {at: 1.4, is: 'M 30 40 H 50'},
+]);
+
+assertAttributeInterpolation({
+ property: 'd',
+ underlying: 'M 10 10 H 20',
+ from: 'm 20 30 L 40 50',
+ fromComposite: 'add',
+ to: 'm 30 40 L 50 60',
+ toComposite: 'replace',
+}, [
+ {at: -0.4, is: 'm 16 26 L 36 46'},
+ {at: 0, is: 'm 20 30 L 40 50'},
+ {at: 0.2, is: 'm 22 32 L 42 52'},
+ {at: 0.6, is: 'm 26 36 L 46 56'},
+ {at: 1, is: 'm 30 40 L 50 60'},
+ {at: 1.4, is: 'm 34 44 L 54 64'},
+]);
+
+assertAttributeInterpolation({
+ property: 'd',
+ underlying: 'M 10 10 L 20 20',
+ from: neutralKeyframe,
+ to: 'm 30 40 l 50 60',
+ toComposite: 'replace',
+}, [
+ {at: -0.4, is: 'm 2 -2 l -6 -10'},
+ {at: 0, is: 'M 10 10 L 20 20'},
+ {at: 0.2, is: 'm 14 16 l 18 20'},
+ {at: 0.6, is: 'm 22 28 l 34 40'},
+ {at: 1, is: 'm 30 40 l 50 60'},
+ {at: 1.4, is: 'm 38 52 l 66 80'},
+]);
+
+assertAttributeInterpolation({
+ property: 'd',
+ underlying: 'M 10 10 L 20 20',
+ from: neutralKeyframe,
+ to: 'm 30 40 l 50 60',
+ toComposite: 'add',
+}, [
+ {at: -0.4, is: 'm 2 -2 l -6 -10'},
+ {at: 0, is: 'M 10 10 L 20 20'},
+ {at: 0.2, is: 'm 14 16 l 18 20'},
+ {at: 0.6, is: 'm 22 28 l 34 40'},
+ {at: 1, is: 'm 30 40 l 50 60'},
+ {at: 1.4, is: 'm 38 52 l 66 80'},
+]);
+
+assertAttributeInterpolation({
+ property: 'd',
+ underlying: 'm 30 40 l 50 60',
+ from: 'M 10 10 L 20 20',
+ fromComposite: 'add',
+ to: neutralKeyframe,
+}, [
+ {at: -0.4, is: 'm 2 -2 l -6 -10'},
+ {at: 0, is: 'M 10 10 L 20 20'},
+ {at: 0.2, is: 'm 14 16 l 18 20'},
+ {at: 0.6, is: 'm 22 28 l 34 40'},
+ {at: 1, is: 'm 30 40 l 50 60'},
+ {at: 1.4, is: 'm 38 52 l 66 80'},
+]);
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698