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

Side by Side 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, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 <!doctype html>
2 <style>
3
4 .target {
5 font-size: 16px;
6 width: 60px;
7 height: 60px;
8 display: inline-block;
9 border: 2px solid black;
10 margin-right: 2px;
11 }
12 .replica {
13 background-color: green;
14 margin-right: 15px;
15 }
16
17 </style>
18 <body>
19 <script src="../testharness/testharness.js"></script>
20 <script src="../testharness/testharnessreport.js"></script>
21 <script src="resources/interpolation-test.js"></script>
22 <script>
23
24 function vw(x) {
25 return (x * window.innerWidth / 100);
26 }
27
28 function calc(x) {
29 return Math.max(16 + (vw(10) - 16) * x, 0).toFixed(2) + "px";
30 }
31
32 assertInterpolation({
33 property: 'width',
34 from: '1em',
35 to: '10vw'
36 }, [
37 {at: -0.3, is: calc(-0.3)},
38 {at: 0, is: calc(0)},
39 {at: 0.3, is: calc(0.3)},
40 {at: 0.6, is: calc(0.6)},
41 {at: 1, is: calc(1)},
42 {at: 1.5, is: calc(1.5)}
43 ]);
44 </script>
45 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698