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

Unified Diff: polymer_0.5.0/bower_components/web-animations-js/test/blink/resources/keyframes-test.js

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/resources/keyframes-test.js
diff --git a/polymer_0.5.0/bower_components/web-animations-js/test/blink/resources/keyframes-test.js b/polymer_0.5.0/bower_components/web-animations-js/test/blink/resources/keyframes-test.js
new file mode 100644
index 0000000000000000000000000000000000000000..c6f01099e1ae573d6c8b475fe4e8a350019e168b
--- /dev/null
+++ b/polymer_0.5.0/bower_components/web-animations-js/test/blink/resources/keyframes-test.js
@@ -0,0 +1,33 @@
+(function(){
+'use strict'
+
+function createElement() {
+ var element = document.createElement('div');
+ element.style.position = 'absolute';
+ document.documentElement.appendChild(element);
+ return element;
+}
+
+function heldTiming(progress) {
+ return {
+ duration: 1000,
+ fill: 'forwards',
+ delay: -progress * 1000,
+ };
+}
+
+function assertAnimationStyles(keyframes, expectations, description) {
+ for (var progress in expectations) {
+ var element = createElement();
+ element.animate(keyframes, heldTiming(progress));
+
+ var computedStyle = getComputedStyle(element);
+ for (var property in expectations[progress]) {
+ assert_equals(computedStyle[property], expectations[progress][property],
+ property + ' at ' + (progress * 100) + '%' + (description ? ' ' + description : ''));
+ }
+ }
+}
+
+window.assertAnimationStyles = assertAnimationStyles;
+})();

Powered by Google App Engine
This is Rietveld 408576698