OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <style> |
| 3 #test1 { |
| 4 -webkit-animation-fill-mode: forwards; |
| 5 -webkit-animation-duration: 1s; |
| 6 -webkit-animation-name: green; |
| 7 } |
| 8 #test2 { |
| 9 -webkit-animation-fill-mode: forwards; |
| 10 -webkit-animation-duration: 1s; |
| 11 } |
| 12 #test3 { |
| 13 -webkit-animation-fill-mode: forwards; |
| 14 -webkit-animation-duration: 1s; |
| 15 -webkit-animation-name: empty; |
| 16 } |
| 17 @-webkit-keyframes green { |
| 18 from { |
| 19 background-color: white; |
| 20 } |
| 21 to { |
| 22 background-color: green; |
| 23 } |
| 24 } |
| 25 @-webkit-keyframes empty { |
| 26 } |
| 27 </style> |
| 28 Tests that an animation with no keyframes does not start. |
| 29 <div id="result">FAIL - nothing happened</div> |
| 30 <div id="test1"></div> |
| 31 <div id="test2"></div> |
| 32 <div id="test3"></div> |
| 33 <script> |
| 34 if (window.testRunner) { |
| 35 testRunner.dumpAsText(); |
| 36 testRunner.waitUntilDone(); |
| 37 } |
| 38 var pass = true; |
| 39 test1.addEventListener('webkitAnimationStart', function() { |
| 40 test2.style.webkitAnimationName = 'green'; |
| 41 }); |
| 42 test2.addEventListener('webkitAnimationStart', function() { |
| 43 result.innerText = pass ? 'PASS' : 'FAIL'; |
| 44 if (window.testRunner) |
| 45 testRunner.notifyDone(); |
| 46 }); |
| 47 test3.addEventListener('webkitAnimationStart', function() { |
| 48 pass = false; |
| 49 }); |
| 50 </script> |
OLD | NEW |