| OLD | NEW |
| 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 Loading... |
| 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> |
| OLD | NEW |