Added Polymer

This commit is contained in:
Thaum
2014-11-26 10:18:35 +00:00
parent 5eea4714b2
commit 3408ba9e8d
1210 changed files with 394645 additions and 47 deletions

View File

@@ -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;
})();