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

Unified Diff: polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/line-height-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/line-height-interpolation.html
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/line-height-interpolation.html b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/line-height-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..0d1139d985ced3d9338d00ca31e5d33e5ff41d64
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/line-height-interpolation.html
@@ -0,0 +1,188 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+@viewport {
+ width: 800px;
+ height: 600px;
+}
+.target {
+ display: inline-block;
+ font: 20px sans-serif;
+}
+.replica {
+ color: green;
+ margin-right: 30px;
+}
+</style>
+<body>
+<template id="target-template">
+ <p>
+ v<br />v
+ </p>
+</template>
+<script src="../testharness/testharness.js"></script>
+<script src="../testharness/testharnessreport.js"></script>
+<script src="resources/interpolation-test.js"></script>
+<script>
+assertInterpolation({
+ property: 'line-height',
+ from: '4',
+ to: '14'
+}, [
+ {at: -1, is: '0'},
+ {at: -0.3, is: '1'},
+ {at: 0, is: '4'},
+ {at: 0.3, is: '7'},
+ {at: 0.6, is: '10'},
+ {at: 1, is: '14'},
+ {at: 1.5, is: '19'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: '4px',
+ to: '14px'
+}, [
+ {at: -1, is: '0px'},
+ {at: -0.3, is: '1px'},
+ {at: 0, is: '4px'},
+ {at: 0.3, is: '7px'},
+ {at: 0.6, is: '10px'},
+ {at: 1, is: '14px'},
+ {at: 1.5, is: '19px'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: 'normal',
+ to: 'normal'
+}, [
+ {at: -0.3, is: 'normal'},
+ {at: 0, is: 'normal'},
+ {at: 0.3, is: 'normal'},
+ {at: 0.6, is: 'normal'},
+ {at: 1, is: 'normal'},
+ {at: 1.5, is: 'normal'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: '4',
+ to: '14px'
+}, [
+ {at: -0.3, is: '4'},
+ {at: 0, is: '4'},
+ {at: 0.3, is: '4'},
+ {at: 0.6, is: '14px'},
+ {at: 1, is: '14px'},
+ {at: 1.5, is: '14px'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: '14px',
+ to: 'normal'
+}, [
+ {at: -0.3, is: '14px'},
+ {at: 0, is: '14px'},
+ {at: 0.3, is: '14px'},
+ {at: 0.6, is: 'normal'},
+ {at: 1, is: 'normal'},
+ {at: 1.5, is: 'normal'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: 'normal',
+ to: '4'
+}, [
+ {at: -0.3, is: 'normal'},
+ {at: 0, is: 'normal'},
+ {at: 0.3, is: 'normal'},
+ {at: 0.6, is: '4'},
+ {at: 1, is: '4'},
+ {at: 1.5, is: '4'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: '4',
+ to: 'normal'
+}, [
+ {at: -0.3, is: '4'},
+ {at: 0, is: '4'},
+ {at: 0.3, is: '4'},
+ {at: 0.6, is: 'normal'},
+ {at: 1, is: 'normal'},
+ {at: 1.5, is: 'normal'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: 'normal',
+ to: '14px'
+}, [
+ {at: -0.3, is: 'normal'},
+ {at: 0, is: 'normal'},
+ {at: 0.3, is: 'normal'},
+ {at: 0.6, is: '14px'},
+ {at: 1, is: '14px'},
+ {at: 1.5, is: '14px'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: '14px',
+ to: '4'
+}, [
+ {at: -0.3, is: '14px'},
+ {at: 0, is: '14px'},
+ {at: 0.3, is: '14px'},
+ {at: 0.6, is: '4'},
+ {at: 1, is: '4'},
+ {at: 1.5, is: '4'},
+]);
+assertInterpolation({
+ property: 'line-height',
+ from: '4vw',
+ to: '14vw'
+}, [
+ {at: -1, is: '0'},
+ {at: -0.3, is: '1vw'},
+ {at: 0, is: '4vw'},
+ {at: 0.3, is: '7vw'},
+ {at: 0.6, is: '10vw'},
+ {at: 1, is: '14vw'},
+ {at: 1.5, is: '19vw'},
+]);
+// These tests assume a viewport of 800x600.
+// assertInterpolation({
+// property: 'line-height',
+// from: '50vmin',
+// to: '100px'
+// }, [
+// {at: -0.25, is: '350px'},
+// {at: 0, is: '300px'},
+// {at: 0.25, is: '250px'},
+// {at: 0.75, is: '150px'},
+// {at: 1, is: '100px'},
+// {at: 1.5, is: '0px'},
+// ]);
+// assertInterpolation({
+// property: 'line-height',
+// from: '100px',
+// to: '50vmax'
+// }, [
+// {at: -0.25, is: '25px'},
+// {at: 0, is: '100px'},
+// {at: 0.25, is: '175px'},
+// {at: 0.75, is: '325px'},
+// {at: 1, is: '400px'},
+// {at: 1.5, is: '550px'},
+// ]);
+// assertInterpolation({
+// property: 'line-height',
+// from: '75vw',
+// to: '25vh'
+// }, [
+// {at: -0.25, is: '712.5px'},
+// {at: 0, is: '600px'},
+// {at: 0.25, is: '487.5px'},
+// {at: 0.75, is: '262.5px'},
+// {at: 1, is: '150px'},
+// {at: 1.5, is: '0px'}, // line-height must not be less than 0.
+// ]);
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698