Index: polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/calc-interpolation.html |
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/calc-interpolation.html b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/calc-interpolation.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e40cfcfe21e2dd6114211c66f56aa67193b27df6 |
--- /dev/null |
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/calc-interpolation.html |
@@ -0,0 +1,92 @@ |
+<!DOCTYPE html> |
+<meta charset="UTF-8"> |
+<style> |
+.container { |
+ position: relative; |
+ width: 50px; |
+ height: 50px; |
+ border: black solid 2px; |
+ display: inline-block; |
+ margin-left: 10px; |
+ margin-right: 10px; |
+ background-color: white; |
+} |
+.target { |
+ position: absolute; |
+ width: 10px; |
+ height: 50px; |
+ background-color: black; |
+} |
+.replica { |
+ position: absolute; |
+ background-color: green; |
+} |
+</style> |
+<body> |
+<template id="target-template"> |
+ <div class="container"> |
+ <div class="target"></div> |
+ </div> |
+</template> |
+<script src="../testharness/testharness.js"></script> |
+<script src="../testharness/testharnessreport.js"></script> |
+<script src="resources/interpolation-test.js"></script> |
+<script> |
+assertInterpolation({ |
+ property: 'margin-left', |
+ from: 'calc(50% - 25px)', |
+ to: 'calc(100% - 10px)' |
+}, [ |
+ {at: -0.25, is: '-10px'}, |
+ {at: 0, is: '0px'}, |
+ {at: 0.25, is: '10px'}, |
+ {at: 0.5, is: '20px'}, |
+ {at: 0.75, is: '30px'}, |
+ {at: 1, is: '40px'}, |
+ {at: 1.25, is: '50px'} |
+]); |
+ |
+assertInterpolation({ |
+ property: 'text-indent', |
+ from: 'calc(50% - 25px)', |
+ to: 'calc(100% - 10px)' |
+}, [ |
+ {at: -0.25, is: 'calc(((50% - 25px) * 1.25) + ((100% - 10px) * -0.25))'}, |
+ {at: 0, is: 'calc(50% - 25px)'}, |
+ {at: 0.25, is: 'calc(((50% - 25px) * 0.75) + ((100% - 10px) * 0.25))'}, |
+ {at: 0.5, is: 'calc(((50% - 25px) * 0.5) + ((100% - 10px) * 0.5))'}, |
+ {at: 0.75, is: 'calc(((50% - 25px) * 0.25) + ((100% - 10px) * 0.75))'}, |
+ {at: 1, is: 'calc(100% - 10px)'}, |
+ {at: 1.25, is: 'calc(((50% - 25px) * -0.25) + ((100% - 10px) * 1.25))'} |
+]); |
+ |
+assertInterpolation({ |
+ property: 'text-indent', |
+ from: '0em', |
+ to: '100px' |
+}, [ |
+ {at: -0.25, is: '-25px'}, |
+ {at: 0, is: '0em'}, |
+ {at: 0.25, is: '25px'}, |
+ {at: 0.5, is: '50px'}, |
+ {at: 0.75, is: '75px'}, |
+ {at: 1, is: '100px'}, |
+ {at: 1.25, is: '125px'} |
+]); |
+ |
+assertInterpolation({ |
+ property: 'text-indent', |
+ from: '0%', |
+ to: '100px' |
+}, [ |
+ {at: -0.25, is: 'calc(0% + -25px)'}, |
+ {at: 0, is: '0%'}, |
+ {at: 0.25, is: 'calc(0% + 25px)'}, |
+ {at: 0.5, is: 'calc(0% + 50px)'}, |
+ {at: 0.75, is: 'calc(0% + 75px)'}, |
+ {at: 1, is: '100px'}, |
+ {at: 1.25, is: 'calc(0% + 125px)'} |
+]); |
+ |
+</script> |
+</body> |