Chromium Code Reviews| 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><style> | 3 <script src="../../resources/testharnessreport.js"></script><style> |
| 4 @keyframes test { | 4 @keyframes test { |
| 5 from { opacity: 0; } | 5 from { opacity: 0; } |
| 6 to { opacity: 1; } | 6 to { opacity: 1; } |
| 7 } | 7 } |
| 8 .cssAnimation { | 8 .cssAnimation { |
| 9 animation: test 2s; | 9 animation: test 2s; |
| 10 } | 10 } |
| 11 </style> | 11 </style> |
| 12 <div id='container'> | 12 <div id='container'> |
| 13 <div id='element'></div> | 13 <div id='element'></div> |
| 14 </div> | 14 </div> |
| 15 | 15 |
| 16 <script> | 16 <script> |
| 17 async_test(function(t) { | 17 async_test(function(t) { |
| 18 assert_equals(document.timeline.getAnimationPlayers().length, 0); | 18 assert_equals(document.timeline.getAnimations().length, 0); |
| 19 assert_equals(container.getAnimationPlayers().length, 0); | 19 assert_equals(container.getAnimations().length, 0); |
| 20 assert_equals(element.getAnimationPlayers().length, 0); | 20 assert_equals(element.getAnimations().length, 0); |
| 21 | 21 |
| 22 element.className = 'cssAnimation'; | 22 element.className = 'cssAnimation'; |
| 23 onload = function () { | 23 onload = function () { |
| 24 t.step(function() { | 24 t.step(function() { |
| 25 var players = document.timeline.getAnimationPlayers(); | 25 var players = document.timeline.getAnimations(); |
|
alancutter (OOO until 2018)
2015/05/05 01:04:51
s/players/animations/g
dstockwell
2015/05/05 03:33:25
YAAAY done.
| |
| 26 assert_equals(players.length, 1); | 26 assert_equals(players.length, 1); |
| 27 assert_equals(container.getAnimationPlayers().length, 0); | 27 assert_equals(container.getAnimations().length, 0); |
| 28 assert_equals(element.getAnimationPlayers().length, 1); | 28 assert_equals(element.getAnimations().length, 1); |
| 29 | 29 |
| 30 players[0].finish(); | 30 players[0].finish(); |
| 31 assert_equals(document.timeline.getAnimationPlayers().length, 0); | 31 assert_equals(document.timeline.getAnimations().length, 0); |
| 32 assert_equals(container.getAnimationPlayers().length, 0); | 32 assert_equals(container.getAnimations().length, 0); |
| 33 assert_equals(element.getAnimationPlayers().length, 0); | 33 assert_equals(element.getAnimations().length, 0); |
| 34 t.done(); | 34 t.done(); |
| 35 }); | 35 }); |
| 36 } | 36 } |
| 37 }, 'getAnimationPlayers() with cssanimations'); | 37 }, 'getAnimations() with cssanimations'); |
| 38 | 38 |
| 39 </script> | 39 </script> |
| OLD | NEW |