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

Side by Side Diff: third_party/WebKit/LayoutTests/web-animations-api/w3c/2-keyframes-with-offsets.html

Issue 1720403002: Alternative syntax for element.animate list of keyframes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@animations-keyframeeffect-api
Patch Set: Additional (mismatched-length-list) test; ensure offset is initialized Created 4 years, 9 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
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 <script src="resources/keyframes-test.js"></script> 4 <script src="resources/keyframes-test.js"></script>
5 <script> 5 <script>
6 test(function() { 6 test(function() {
7 assertAnimationStyles([ 7 assertAnimationStyles([
8 {opacity: '0.25', left: '25px', offset: 0}, 8 {opacity: '0.25', left: '25px', offset: 0},
9 {opacity: '0.75', left: '75px'}, 9 {opacity: '0.75', left: '75px'},
10 ], { 10 ], {
(...skipping 17 matching lines...) Expand all
28 }); 28 });
29 29
30 test(function() { 30 test(function() {
31 assertAnimationStyles([ 31 assertAnimationStyles([
32 {opacity: '0.25', left: '25px', offset: 0}, 32 {opacity: '0.25', left: '25px', offset: 0},
33 {opacity: '0.75', left: '75px', offset: 1}, 33 {opacity: '0.75', left: '75px', offset: 1},
34 ], { 34 ], {
35 0.5: {opacity: '0.5', left: '50px'}, 35 0.5: {opacity: '0.5', left: '50px'},
36 }); 36 });
37 37
38 assert_throws('InvalidModificationError', function() { 38 assert_throws({name: 'TypeError'}, function() {
39 assertAnimationStyles([ 39 assertAnimationStyles([
40 {opacity: '0.75', left: '75px', offset: 1}, 40 {opacity: '0.75', left: '75px', offset: 1},
41 {opacity: '0.25', left: '25px', offset: 0}, 41 {opacity: '0.25', left: '25px', offset: 0},
42 ], { 42 ], {
43 0.5: {opacity: '0.5', left: '50px'}, 43 0.5: {opacity: '0.5', left: '50px'},
44 }); 44 });
45 }); 45 });
46 }, 46 },
47 'element.animate() with 2 keyframes and 2 offsets specified', 47 'element.animate() with 2 keyframes and 2 offsets specified',
48 { 48 {
49 help: 'http://dev.w3.org/fxtf/web-animations/#keyframe-animation-effects', 49 help: 'http://dev.w3.org/fxtf/web-animations/#keyframe-animation-effects',
50 assert: [ 50 assert: [
51 'element.animate() should start an animation when two keyframes', 51 'element.animate() should start an animation when two keyframes',
52 'are provided with matching properties and both offsets specified.', 52 'are provided with matching properties and both offsets specified.',
53 ], 53 ],
54 author: 'Alan Cutter', 54 author: 'Alan Cutter',
55 }); 55 });
56 </script> 56 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698