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

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

Issue 2732353003: [WIP] Web Animations: Test composition of the 'd' property
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/animations/composition/d-composition.html
diff --git a/third_party/WebKit/LayoutTests/animations/composition/d-composition.html b/third_party/WebKit/LayoutTests/animations/composition/d-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..b0523a1c13fe80a1dcf6a6363778a932cd3a45a6
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/composition/d-composition.html
@@ -0,0 +1,94 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<body>
+<script src="../interpolation/resources/interpolation-test.js"></script>
+<script>
+
+// SVG Paths always replace.
+
+assertComposition({
+ property: 'd',
+ underlying: "path('M 10 10 H 20')",
+ addFrom: "path('M 20 30 L 40 50')",
+ addTo: "path('M 30 40 L 50 60')",
+}, [
+ {at: -0.4, is: "path('M 16 26 L 36 46')"},
+ {at: 0, is: "path('M 20 30 L 40 50')"},
+ {at: 0.2, is: "path('M 22 32 L 42 52')"},
+ {at: 0.6, is: "path('M 26 36 L 46 56')"},
+ {at: 1, is: "path('M 30 40 L 50 60')"},
+ {at: 1.4, is: "path('M 34 44 L 54 64')"},
+]);
+
+assertComposition({
+ property: 'd',
+ underlying: "path('M 10 10 H 20')",
+ addFrom: "path('M 20 30 L 40 50')",
+ addTo: "path('M 30 40 H 50')",
+}, [
+ {at: -0.4, is: "path('M 20 30 L 40 50')"},
+ {at: 0, is: "path('M 20 30 L 40 50')"},
+ {at: 0.2, is: "path('M 20 30 L 40 50')"},
+ {at: 0.6, is: "path('M 30 40 H 50')"},
+ {at: 1, is: "path('M 30 40 H 50')"},
+ {at: 1.4, is: "path('M 30 40 H 50')"},
+]);
+
+assertComposition({
+ property: 'd',
+ underlying: "path('M 10 10 H 20')",
+ addFrom: "path('m 20 30 L 40 50')",
+ replaceTo: "path('m 30 40 L 50 60')",
+}, [
+ {at: -0.4, is: "path('m 16 26 L 36 46')"},
+ {at: 0, is: "path('m 20 30 L 40 50')"},
+ {at: 0.2, is: "path('m 22 32 L 42 52')"},
+ {at: 0.6, is: "path('m 26 36 L 46 56')"},
+ {at: 1, is: "path('m 30 40 L 50 60')"},
+ {at: 1.4, is: "path('m 34 44 L 54 64')"},
+]);
+
+assertComposition({
+ property: 'd',
+ underlying: "path('M 10 10 L 20 20')",
+ addFrom: neutralKeyframe,
+ replaceTo: "path('m 30 40 l 50 60')",
+}, [
+ {at: -0.4, is: "path('m 2 -2 l -6 -10')"},
+ {at: 0, is: "path('M 10 10 L 20 20')"},
+ {at: 0.2, is: "path('m 14 16 l 18 20')"},
+ {at: 0.6, is: "path('m 22 28 l 34 40')"},
+ {at: 1, is: "path('m 30 40 l 50 60')"},
+ {at: 1.4, is: "path('m 38 52 l 66 80')"},
+]);
+
+assertComposition({
+ property: 'd',
+ underlying: "path('M 10 10 L 20 20')",
+ addFrom: neutralKeyframe,
+ addTo: "path('m 30 40 l 50 60')",
+}, [
+ {at: -0.4, is: "path('m 2 -2 l -6 -10')"},
+ {at: 0, is: "path('M 10 10 L 20 20')"},
+ {at: 0.2, is: "path('m 14 16 l 18 20')"},
+ {at: 0.6, is: "path('m 22 28 l 34 40')"},
+ {at: 1, is: "path('m 30 40 l 50 60')"},
+ {at: 1.4, is: "path('m 38 52 l 66 80')"},
+]);
+
+assertComposition({
+ property: 'd',
+ underlying: "path('m 30 40 l 50 60')",
+ addFrom: "path('M 10 10 L 20 20')",
+ addTo: neutralKeyframe,
+}, [
+ {at: -0.4, is: "path('m 2 -2 l -6 -10')"},
+ {at: 0, is: "path('M 10 10 L 20 20')"},
+ {at: 0.2, is: "path('m 14 16 l 18 20')"},
+ {at: 0.6, is: "path('m 22 28 l 34 40')"},
+ {at: 1, is: "path('m 30 40 l 50 60')"},
+ {at: 1.4, is: "path('m 38 52 l 66 80')"},
+]);
+</script>
+</body>
+</html>
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698