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..e85063b5387c18f2ffc849e7e1e9639262a03346 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-d-composition.html |
@@ -0,0 +1,101 @@ |
+<!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'; |
+ |
+assertAttributeInterpolation({ |
+ property: 'd', |
+ underlying: 'm 1 1', |
+ fromComposite: 'add', |
+ from: 'm 2 3', |
+ toComposite: 'add', |
+ to: 'm 3 4' |
+}, [ |
+ {at: -0.4, is: 'm 2.6 3.6'}, |
+ {at: 0, is: 'm 3 4'}, |
+ {at: 0.2, is: 'm 3.2 4.2'}, |
+ {at: 0.6, is: 'm 3.6 4.6'}, |
+ {at: 1, is: 'm 4 5'}, |
+ {at: 1.4, is: 'm 4.4 5.4'} |
+]); |
+ |
+assertAttributeInterpolation({ |
+ property: 'd', |
+ underlying: 'm 1 1', |
+ fromComposite: 'replace', |
+ from: 'm 2 3', |
+ toComposite: 'add', |
+ to: 'm 3 4' |
+}, [ |
+ {at: -0.4, is: 'm 1.2 2.2'}, |
+ {at: 0, is: 'm 2 3'}, |
+ {at: 0.2, is: 'm 2.4 3.4'}, |
+ {at: 0.6, is: 'm 3.2 4.2'}, |
+ {at: 1, is: 'm 4 5'}, |
+ {at: 1.4, is: 'm 4.8 5.8'} |
+]); |
+ |
+assertAttributeInterpolation({ |
+ property: 'd', |
+ underlying: 'm 0 0', |
+ fromComposite: 'add', |
+ from: 'm 2 3', |
+ toComposite: 'replace', |
+ to: 'm 3 4' |
+}, [ |
+ {at: -0.4, is: 'm 1.6 2.6'}, |
+ {at: 0, is: 'm 2 3'}, |
+ {at: 0.2, is: 'm 2.2 3.2'}, |
+ {at: 0.6, is: 'm 2.6 3.6'}, |
+ {at: 1, is: 'm 3 4'}, |
+ {at: 1.4, is: 'm 3.4 4.4'} |
+]); |
+ |
+assertAttributeInterpolation({ |
+ property: 'd', |
+ underlying: 'm 1 2', |
+ fromComposite: 'add', |
+ from: '', |
+ toComposite: 'replace', |
+ to: 'm 6 7' |
+}, [ |
+ {at: -0.4, is: 'm -1 0'}, |
+ {at: 0, is: 'm 1 2'}, |
+ {at: 0.2, is: 'm 2 3'}, |
+ {at: 0.6, is: 'm 4 5'}, |
+ {at: 1, is: 'm 6 7'}, |
+ {at: 1.4, is: 'm 8 9'} |
+]); |
+ |
+assertAttributeInterpolation({ |
+ property: 'd', |
+ underlying: 'm 0 0 l 1 1', |
+ fromComposite: 'add', |
+ from: '', |
+ toComposite: 'replace', |
+ to: 'm 6 7' |
+}, [ |
+ {at: 0.2, is: 'm 0 0 l 1 1'}, |
+ {at: 0.6, is: 'm 6 7'}, |
+]); |
+ |
+assertAttributeInterpolation({ |
+ property: 'd', |
+ underlying: 'm 0 0 l 1 1', |
+ fromComposite: 'add', |
+ from: 'm 1 2', |
+ toComposite: 'replace', |
+ to: 'm 6 7' |
+}, [ |
+ {at: 0.2, is: 'm 2 3'}, |
+ {at: 0.6, is: 'm 4 5'}, |
+]); |
+</script> |
+</body> |
+</html> |