OLD | NEW |
1 <!doctype html> | 1 <!doctype html> |
2 <style> | 2 <style> |
3 .start { | 3 .start { |
4 -webkit-animation: anim 1ms; | 4 -webkit-animation: anim 1ms; |
5 } | 5 } |
6 | 6 |
7 @-webkit-keyframes anim { | 7 @-webkit-keyframes anim { |
8 0% { | 8 0% { |
9 -webkit-transform: translate3d(0, 0, 1px); | 9 -webkit-transform: translate3d(0, 0, 1px); |
10 } | 10 } |
11 100% { | 11 100% { |
12 -webkit-transform: translate3d(0, 0, 0); | 12 -webkit-transform: translate3d(0, 0, 0); |
13 } | 13 } |
14 } | 14 } |
15 </style> | 15 </style> |
16 <body> | 16 <body> |
17 <script> | 17 <script> |
18 if (window.testRunner) { | 18 if (window.testRunner) { |
19 testRunner.dumpAsText(); | 19 testRunner.dumpAsText(); |
20 testRunner.waitUntilDone(); | 20 testRunner.waitUntilDone(); |
21 document.body.addEventListener('webkitAnimationEnd', function() { | 21 document.body.addEventListener('webkitAnimationEnd', function() { |
22 testRunner.notifyDone(); | 22 testRunner.notifyDone(); |
23 }); | 23 }); |
24 } | 24 } |
25 document.body.textContent = 'FAIL (expected if outside the virtual/threaded suit
e)'; | 25 document.body.textContent = 'FAIL (expected if outside the virtual/threaded suit
e)'; |
26 document.body.classList.add('start'); | 26 requestAnimationFrame(function() { |
27 document.body.offsetTop; | 27 document.body.classList.add('start'); |
28 setTimeout(function() { | 28 document.body.offsetTop; |
29 document.body.addEventListener('webkitAnimationStart', function() { | 29 setTimeout(function() { |
30 document.body.textContent = 'PASS'; | 30 document.body.addEventListener('webkitAnimationStart', function() { |
31 }); | 31 document.body.textContent = 'PASS'; |
32 }, 0); | 32 }); |
| 33 }, 0); |
| 34 }); |
33 </script> | 35 </script> |
OLD | NEW |