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

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

Issue 1406393006: Web Animations: Migrate SVG integer interpolation to interpolation types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
Index: third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-targetX-targetY-composition.html
diff --git a/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-targetX-targetY-composition.html b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-targetX-targetY-composition.html
new file mode 100644
index 0000000000000000000000000000000000000000..5846a1b77c55197ec9b28358cc10dc8b51ef3f61
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/animations/svg-attribute-composition/svg-targetX-targetY-composition.html
@@ -0,0 +1,110 @@
+<!DOCTYPE html>
+<html>
+<body>
+<template id="target-template">
+<svg width="90" height="90">
+<feConvolveMatrix class="target" />
+</svg>
+</template>
+<script src="../svg-attribute-interpolation/resources/interpolation-test.js"></script>
+<script>
+'use strict';
+assertAttributeInterpolation({
+ property: 'targetX',
+ underlying: '128',
+ fromComposite: 'add',
+ from: '-32',
+ toComposite: 'add',
+ to: '1029'
+}, [
+ {at: -0.4, is: -328},
+ {at: 0, is: 96},
+ {at: 0.2, is: 308},
+ {at: 0.6, is: 733},
+ {at: 1, is: 1157},
+ {at: 1.4, is: 1581}
+]);
+
+assertAttributeInterpolation({
+ property: 'targetX',
+ underlying: '-37',
+ fromComposite: 'replace',
+ from: '18',
+ toComposite: 'add',
+ to: '1'
+}, [
+ {at: -0.4, is: 40},
+ {at: 0, is: 18},
+
+ {at: 0.6, is: -14},
+ {at: 1, is: -36},
+ {at: 1.4, is: -58}
+]);
+
+assertAttributeInterpolation({
+ property: 'targetX',
+ underlying: '2',
+ fromComposite: 'add',
+ from: '',
+ toComposite: 'replace',
+ to: '-99'
+}, [
+ {at: -0.4, is: 42},
+ {at: 0, is: 2},
+ {at: 0.2, is: -18},
+ {at: 0.6, is: -59},
+ {at: 1, is: -99},
+ {at: 1.4, is: -139}
+]);
+
+
+assertAttributeInterpolation({
+ property: 'targetY',
+ underlying: '128',
+ fromComposite: 'add',
+ from: '-32',
+ toComposite: 'add',
+ to: '1029'
+}, [
+ {at: -0.4, is: -328},
+ {at: 0, is: 96},
+ {at: 0.2, is: 308},
+ {at: 0.6, is: 733},
+ {at: 1, is: 1157},
+ {at: 1.4, is: 1581}
+]);
+
+assertAttributeInterpolation({
+ property: 'targetY',
+ underlying: '-37',
+ fromComposite: 'replace',
+ from: '18',
+ toComposite: 'add',
+ to: '1'
+}, [
+ {at: -0.4, is: 40},
+ {at: 0, is: 18},
+
+ {at: 0.6, is: -14},
+ {at: 1, is: -36},
+ {at: 1.4, is: -58}
+]);
+
+assertAttributeInterpolation({
+ property: 'targetY',
+ underlying: '2',
+ fromComposite: 'add',
+ from: '',
+ toComposite: 'replace',
+ to: '-99'
+}, [
+ {at: -0.4, is: 42},
+ {at: 0, is: 2},
+ {at: 0.2, is: -18},
+ {at: 0.6, is: -59},
+ {at: 1, is: -99},
+ {at: 1.4, is: -139}
+]);
+</script>
+</body>
+</html>

Powered by Google App Engine
This is Rietveld 408576698