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

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

Issue 1418003008: Web Animations: Add SVGPointListInterpolationType (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@_fixSVGNeutral
Patch Set: Rebase Created 5 years, 1 month 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-points-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-points-composition.html
diff --git a/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-points-composition.html b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-points-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..68a257170c50e955922ae12e1405f6760ef1d16e
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-points-composition.html
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<html>
+<body>
+<template id="target-template">
+<svg width="0" height="0">
+<polygon class="target" />
+</svg>
+</template>
+<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
+<script>
+'use strict';
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20',
+ from: '40 40, 30 30',
+ fromComposite: 'add',
+ to: '90 90, -10 -10',
+ toComposite: 'add',
+}, [
+ {at: -0.4, is: '30 30, 66 66'},
+ {at: 0, is: '50 50, 50 50'},
+ {at: 0.2, is: '60 60, 42 42'},
+ {at: 0.6, is: '80 80, 26 26'},
+ {at: 1, is: '100 100, 10 10'},
+ {at: 1.4, is: '120 120, -6 -6'},
+]);
+
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20',
+ from: '40 40, 30 30',
+ fromComposite: 'add',
+ to: '90 90, -10 -10, 50 50',
+ toComposite: 'add',
+}, [
+ {at: -0.4, is: '50 50, 50 50'},
+ {at: 0, is: '50 50, 50 50'},
+ {at: 0.2, is: '50 50, 50 50'},
+ {at: 0.6, is: '180 180, -20 -20, 100 100'},
+ {at: 1, is: '180 180, -20 -20, 100 100'},
+ {at: 1.4, is: '180 180, -20 -20, 100 100'},
+]);
+
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20, 50 50',
+ from: '40 40',
+ fromComposite: 'add',
+ to: '90 90, -10 -10',
+ toComposite: 'add',
+}, [
+ {at: -0.4, is: '80 80'},
+ {at: 0, is: '80 80'},
+ {at: 0.2, is: '80 80'},
+ {at: 0.6, is: '180 180, -20 -20'},
+ {at: 1, is: '180 180, -20 -20'},
+ {at: 1.4, is: '180 180, -20 -20'},
+]);
+
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20',
+ from: '40 40, 30 30',
+ fromComposite: 'add',
+ to: '90 90, -10 -10',
+ toComposite: 'replace',
+}, [
+ {at: -0.4, is: '34 34, 74 74'},
+ {at: 0, is: '50 50, 50 50'},
+ {at: 0.2, is: '58 58, 38 38'},
+ {at: 0.6, is: '74 74, 14 14'},
+ {at: 1, is: '90 90, -10 -10'},
+ {at: 1.4, is: '106 106, -34 -34'},
+]);
+
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20',
+ from: '40 40, 30 30',
+ fromComposite: 'add',
+ to: '90 90, -10 -10, 50 50',
+ toComposite: 'replace',
+}, [
+ {at: -0.4, is: '50 50, 50 50'},
+ {at: 0, is: '50 50, 50 50'},
+ {at: 0.2, is: '50 50, 50 50'},
+ {at: 0.6, is: '90 90, -10 -10, 50 50'},
+ {at: 1, is: '90 90, -10 -10, 50 50'},
+ {at: 1.4, is: '90 90, -10 -10, 50 50'},
+]);
+
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20, 50 50',
+ from: '40 40',
+ fromComposite: 'add',
+ to: '90 90, -10 -10',
+ toComposite: 'replace',
+}, [
+ {at: -0.4, is: '80 80'},
+ {at: 0, is: '80 80'},
+ {at: 0.2, is: '80 80'},
+ {at: 0.6, is: '90 90, -10 -10'},
+ {at: 1, is: '90 90, -10 -10'},
+ {at: 1.4, is: '90 90, -10 -10'},
+]);
+
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20',
+ to: '90 90, -10 -10',
+ toComposite: 'replace',
+}, [
+ {at: -0.4, is: '-22 -22, 32 32'},
+ {at: 0, is: '10 10, 20 20'},
+ {at: 0.2, is: '26 26, 14 14'},
+ {at: 0.6, is: '58 58, 2 2'},
+ {at: 1, is: '90 90, -10 -10'},
+ {at: 1.4, is: '122 122, -22 -22'},
+]);
+
+assertAttributeInterpolation({
+ property: 'points',
+ underlying: '10 10, 20 20',
+ to: '90 90, -10 -10, 50 50',
+ toComposite: 'replace',
+}, [
+ {at: -0.4, is: '10 10, 20 20'},
+ {at: 0, is: '10 10, 20 20'},
+ {at: 0.2, is: '10 10, 20 20'},
+ {at: 0.6, is: '90 90, -10 -10, 50 50'},
+ {at: 1, is: '90 90, -10 -10, 50 50'},
+ {at: 1.4, is: '90 90, -10 -10, 50 50'},
+]);
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-points-composition-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698