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

Unified Diff: polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/border-image-width-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/border-image-width-interpolation.html
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/border-image-width-interpolation.html b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/border-image-width-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..bfbbf753aa2e3cdb597d23ee944459f45d28a820
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/border-image-width-interpolation.html
@@ -0,0 +1,154 @@
+<!DOCTYPE html>
+<meta charset="UTF-8">
+<style>
+.target {
+ width: 100px;
+ height: 100px;
+ background-color: black;
+ display: inline-block;
+ border: 10px;
+ border-image-source: linear-gradient(45deg, red, blue, green);
+}
+.replica {
+ background-color: green;
+ margin-right: 2px;
+}
+</style>
+<body>
+<script src="../testharness/testharness.js"></script>
+<script src="../testharness/testharnessreport.js"></script>
+<script src="resources/interpolation-test.js"></script>
+<script>
+assertInterpolation({
+ property: 'border-image-width',
+ from: '0px',
+ to: '20px'
+}, [
+ {at: -0.3, is: '0px'}, // CSS border-image-width can't be negative.
+ {at: 0, is: '0px'},
+ {at: 0.3, is: '6px'},
+ {at: 0.6, is: '12px'},
+ {at: 1, is: '20px'},
+ {at: 1.5, is: '30px'},
+ {at: 5, is: '100px'},
+ {at: 10, is: '200px'}
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '0%',
+ to: '20%'
+}, [
+ {at: -0.3, is: '0%'}, // CSS border-image-width can't be negative.
+ {at: 0, is: '0%'},
+ {at: 0.3, is: '6%'},
+ {at: 0.6, is: '12%'},
+ {at: 1, is: '20%'},
+ {at: 1.5, is: '30%'},
+ {at: 5, is: '100%'},
+ {at: 10, is: '200%'}
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '0',
+ to: '20'
+}, [
+ {at: -0.3, is: '0'}, // CSS border-image-width can't be negative.
+ {at: 0, is: '0'},
+ {at: 0.3, is: '6'},
+ {at: 0.6, is: '12'},
+ {at: 1, is: '20'},
+ {at: 1.5, is: '30'},
+ {at: 5, is: '100'},
+ {at: 10, is: '200'}
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '10px 20% 30 40px',
+ to: '80px 70% 60 50px'
+}, [
+ {at: -0.3, is: '0px 5% 21 37px'}, // CSS border-image-width can't be negative.
+ {at: 0, is: '10px 20% 30 40px'},
+ {at: 0.3, is: '31px 35% 39 43px'},
+ {at: 0.6, is: '52px 50% 48 46px'},
+ {at: 1, is: '80px 70% 60 50px'},
+ {at: 1.5, is: '115px 95% 75 55px'},
+ {at: 5, is: '360px 270% 180 90px'},
+ {at: 10, is: '710px 520% 330 140px'}
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '10%',
+ to: '20px'
+}, [
+ // Percentages are relative to the size of the border image area, which is 120px.
+ {at: -0.3, is: 'calc(13% + -6px)'}, // Should be parsed as 16px - 6px = 10px
+ {at: 0, is: '10%'}, // Should be parsed as 12px
+ {at: 0.3, is: 'calc(7% + 6px)'}, // Should be parsed as 8px + 6px = 14px
+ {at: 0.6, is: 'calc(4% + 12px)'}, // Should be parsed as 5px + 12px = 17px
+ {at: 1, is: '20px'},
+ {at: 1.5, is: 'calc(-5% + 30px)'}, // Should be parsed as -6px + 30px = 24px
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '10px',
+ to: '20%'
+}, [
+ // Percentages are relative to the size of the border image area, which is 120px.
+ {at: -0.3, is: 'calc(13px + -6%)'}, // Should be parsed as 13px - 7px = 6px
+ {at: 0, is: '10px'},
+ {at: 0.3, is: 'calc(7px + 6%)'}, // Should be parsed as 7px + 7px = 14px
+ {at: 0.6, is: 'calc(4px + 12%)'}, // Should be parsed as 4px + 14px = 18px
+ {at: 1, is: '20%'}, // Should be parsed as 24px
+ {at: 1.5, is: 'calc(-5px + 30%)'}, // Should be parsed as -5px + 36px = 31px
+]);
+
+assertInterpolation({
+ property: 'border-image-width',
+ from: '10px',
+ to: '20'
+}, [
+ {at: -0.3, is: '10px'},
+ {at: 0, is: '10px'},
+ {at: 0.3, is: '10px'},
+ {at: 0.6, is: '20'},
+ {at: 1, is: '20'},
+ {at: 1.5, is: '20'},
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '10',
+ to: '20px'
+}, [
+ {at: -0.3, is: '10'},
+ {at: 0, is: '10'},
+ {at: 0.3, is: '10'},
+ {at: 0.6, is: '20px'},
+ {at: 1, is: '20px'},
+ {at: 1.5, is: '20px'},
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '10%',
+ to: '20'
+}, [
+ {at: -0.3, is: '10%'},
+ {at: 0, is: '10%'},
+ {at: 0.3, is: '10%'},
+ {at: 0.6, is: '20'},
+ {at: 1, is: '20'},
+ {at: 1.5, is: '20'},
+]);
+assertInterpolation({
+ property: 'border-image-width',
+ from: '10',
+ to: '20%'
+}, [
+ {at: -0.3, is: '10'},
+ {at: 0, is: '10'},
+ {at: 0.3, is: '10'},
+ {at: 0.6, is: '20%'},
+ {at: 1, is: '20%'},
+ {at: 1.5, is: '20%'},
+]);
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698