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

Unified Diff: polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/viewport-unit-interpolation.html

Issue 786953007: npm_modules: Fork bower_components into Polymer 0.4.0 and 0.5.0 versions (Closed) Base URL: https://chromium.googlesource.com/infra/third_party/npm_modules.git@master
Patch Set: Created 5 years, 12 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
Index: polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/viewport-unit-interpolation.html
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/viewport-unit-interpolation.html b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/viewport-unit-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..e78969cee9e4dbf2aa8b83017d991e62627715ad
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/viewport-unit-interpolation.html
@@ -0,0 +1,45 @@
+<!doctype html>
+<style>
+
+.target {
+ font-size: 16px;
+ width: 60px;
+ height: 60px;
+ display: inline-block;
+ border: 2px solid black;
+ margin-right: 2px;
+}
+.replica {
+ background-color: green;
+ margin-right: 15px;
+}
+
+</style>
+<body>
+<script src="../testharness/testharness.js"></script>
+<script src="../testharness/testharnessreport.js"></script>
+<script src="resources/interpolation-test.js"></script>
+<script>
+
+function vw(x) {
+ return (x * window.innerWidth / 100);
+}
+
+function calc(x) {
+ return Math.max(16 + (vw(10) - 16) * x, 0).toFixed(2) + "px";
+}
+
+assertInterpolation({
+ property: 'width',
+ from: '1em',
+ to: '10vw'
+}, [
+ {at: -0.3, is: calc(-0.3)},
+ {at: 0, is: calc(0)},
+ {at: 0.3, is: calc(0.3)},
+ {at: 0.6, is: calc(0.6)},
+ {at: 1, is: calc(1)},
+ {at: 1.5, is: calc(1.5)}
+]);
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698