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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/w3c/resources/keyframes-test.js

Issue 2910883002: Clean up duplicate tests in web-animations-api (Closed)
Patch Set: Rebase and remove one more reference to deleted test Created 3 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 (function(){
2 'use strict'
3
4 function createElement() {
5 var element = document.createElement('div');
6 document.documentElement.appendChild(element);
7 return element;
8 }
9
10 function heldTiming(progress) {
11 return {
12 duration: 1000,
13 fill: 'forwards',
14 delay: -progress * 1000,
15 };
16 }
17
18 function assertAnimationStyles(keyframes, expectations, description) {
19 for (var progress in expectations) {
20 var element = createElement();
21 element.animate(keyframes, heldTiming(progress));
22 var computedStyle = getComputedStyle(element);
23 for (var property in expectations[progress]) {
24 assert_equals(computedStyle[property], expectations[progress][property],
25 property + ' at ' + (progress * 100) + '%' + (description ? ' ' + desc ription : ''));
26 }
27 }
28 }
29
30 window.assertAnimationStyles = assertAnimationStyles;
31 })();
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698