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

Side by Side Diff: LayoutTests/web-animations-api/animation-constructor.html

Issue 1113173003: Web Animations: Update naming to reflect spec changes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Use new API in layout tests Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 4
5 <div id='e'></div> 5 <div id='e'></div>
6 6
7 <script> 7 <script>
8 var element = document.getElementById('e'); 8 var element = document.getElementById('e');
9 9
10 var keyframes = [{opacity: '1'}, {opacity: '0'}]; 10 var keyframes = [{opacity: '1'}, {opacity: '0'}];
11 var timingObject = {duration: 2, iterations: 5}; 11 var timingObject = {duration: 2, iterations: 5};
12 12
13 test(function() { 13 test(function() {
14 var animation = new Animation(element, keyframes, timingObject); 14 var animation = new KeyframeEffect(element, keyframes, timingObject);
alancutter (OOO until 2018) 2015/05/05 01:04:50 s/animation/keyframeEffect/g
dstockwell 2015/05/05 03:33:24 DON
15 assert_not_equals(animation, undefined); 15 assert_not_equals(animation, undefined);
16 assert_equals(animation.constructor, Animation); 16 assert_equals(animation.constructor, KeyframeEffect);
17 }, 'Calling new Animation() with a timing object input should create an animatio n.'); 17 }, 'Calling new KeyframeEffect() with a timing object input should create an ani mation.');
18 18
19 test(function() { 19 test(function() {
20 var animation = new Animation(element, keyframes, 2); 20 var animation = new KeyframeEffect(element, keyframes, 2);
21 assert_not_equals(animation, undefined); 21 assert_not_equals(animation, undefined);
22 assert_equals(animation.constructor, Animation); 22 assert_equals(animation.constructor, KeyframeEffect);
23 }, 'Calling new Animation() with a duration input should create an animation.'); 23 }, 'Calling new KeyframeEffect() with a duration input should create an animatio n.');
24 24
25 test(function() { 25 test(function() {
26 var animation = new Animation(element, keyframes); 26 var animation = new KeyframeEffect(element, keyframes);
27 assert_not_equals(animation, undefined); 27 assert_not_equals(animation, undefined);
28 assert_equals(animation.constructor, Animation); 28 assert_equals(animation.constructor, KeyframeEffect);
29 }, 'Calling new Animation() with no timing input should create an animation.'); 29 }, 'Calling new KeyframeEffect() with no timing input should create an animation .');
30 30
31 test(function() { 31 test(function() {
32 var animation = new Animation(null, keyframes); 32 var animation = new KeyframeEffect(null, keyframes);
33 assert_not_equals(animation, undefined); 33 assert_not_equals(animation, undefined);
34 assert_equals(animation.constructor, Animation); 34 assert_equals(animation.constructor, KeyframeEffect);
35 }, 'Calling new Animation() with no target should create an animation.'); 35 }, 'Calling new KeyframeEffect() with no target should create an animation.');
36 </script> 36 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698