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

Unified Diff: polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/background-position-origin-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/background-position-origin-interpolation.html
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/background-position-origin-interpolation.html b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/background-position-origin-interpolation.html
new file mode 100644
index 0000000000000000000000000000000000000000..60009ee1e6ead61349276ea314f7b15d0679b98f
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/blink/interpolation/background-position-origin-interpolation.html
@@ -0,0 +1,142 @@
+<!doctype html>
+<meta charset="utf-8">
+<style>
+.target {
+ border: 3px solid skyblue;
+ width: 100px;
+ height: 100px;
+ background-image: linear-gradient(to right, coral, coral);
+ background-size: 20px 20px;
+ background-repeat: no-repeat;
+ display: inline-block;
+}
+
+.replica {
+ margin-right: 10px;
+}
+</style>
+<body>
+<script src="../testharness/testharness.js"></script>
+<script src="../testharness/testharnessreport.js"></script>
+<script src="resources/interpolation-test.js"></script>
+<script>
+
+// left-top
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'left 20px top 20px',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: 'calc(37.5% + 5px) calc(37.5% + 5px)'},
+ {at: 0.50, is: 'calc(25% + 10px) calc(25% + 10px)'},
+ {at: 0.75, is: 'calc(12.5% + 15px) calc(12.5% + 15px)'},
+ {at: 1, is: 'left 20px top 20px'},
+]);
+
+// center-top
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'center top 20px',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: '50% calc(37.5% + 5px)'},
+ {at: 0.50, is: '50% calc(25% + 10px)'},
+ {at: 0.75, is: '50% calc(12.5% + 15px)'},
+ {at: 1, is: 'center top 20px'},
+]);
+
+// right-top
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'right 20px top 20px',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: 'calc(37.5% + ((100% - 20px) * 0.25)) calc(37.5% + 5px)'},
+ {at: 0.50, is: 'calc(25% + ((100% - 20px) * 0.5)) calc(25% + 10px)'},
+ {at: 0.75, is: 'calc(12.5% + ((100% - 20px) * 0.75)) calc(12.5% + 15px)'},
+ {at: 1, is: 'right 20px top 20px'},
+]);
+
+// left-center
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'left 20px center',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: 'calc(37.5% + 5px) 50%'},
+ {at: 0.50, is: 'calc(25% + 10px) 50%'},
+ {at: 0.75, is: 'calc(12.5% + 15px) 50%'},
+ {at: 1, is: 'left 20px center'},
+]);
+
+// center-center
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'center center',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: '50% 50%'},
+ {at: 0.50, is: '50% 50%'},
+ {at: 0.75, is: '50% 50%'},
+ {at: 1, is: 'center center'}
+]);
+
+// right-center
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'right 20px center',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: 'calc(37.5% + ((100% - 20px) * 0.25)) 50%'},
+ {at: 0.50, is: 'calc(25% + ((100% - 20px) * 0.5)) 50%'},
+ {at: 0.75, is: 'calc(12.5% + ((100% - 20px) * 0.75)) 50%'},
+ {at: 1, is: 'right 20px center'},
+]);
+
+// left-bottom
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'left 20px bottom 20px',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: 'calc(37.5% + 5px) calc(37.5% + ((100% - 20px) * 0.25))'},
+ {at: 0.50, is: 'calc(25% + 10px) calc(25% + ((100% - 20px) * 0.5))'},
+ {at: 0.75, is: 'calc(12.5% + 15px) calc(12.5% + ((100% - 20px) * 0.75))'},
+ {at: 1, is: 'left 20px bottom 20px'},
+]);
+
+// center-bottom
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'center bottom 20px',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: '50% calc(37.5% + ((100% - 20px) * 0.25))'},
+ {at: 0.50, is: '50% calc(25% + ((100% - 20px) * 0.5))'},
+ {at: 0.75, is: '50% calc(12.5% + ((100% - 20px) * 0.75))'},
+ {at: 1, is: 'center bottom 20px'},
+]);
+
+// right-bottom
+assertInterpolation({
+ property: 'background-position',
+ from: 'center center',
+ to: 'right 20px bottom 20px',
+}, [
+ {at: 0, is: 'center center'},
+ {at: 0.25, is: 'calc(37.5% + ((100% - 20px) * 0.25)) calc(37.5% + ((100% - 20px) * 0.25))'},
+ {at: 0.50, is: 'calc(25% + ((100% - 20px) * 0.5)) calc(25% + ((100% - 20px) * 0.5))'},
+ {at: 0.75, is: 'calc(12.5% + ((100% - 20px) * 0.75)) calc(12.5% + ((100% - 20px) * 0.75))'},
+ {at: 1, is: 'right 20px bottom 20px'},
+]);
+
+</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698