OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 #target { | 3 #target { |
4 position: absolute; | 4 position: absolute; |
5 top: 0; | 5 top: 0; |
6 width: 100px; | 6 width: 100px; |
7 height: 100px; | 7 height: 100px; |
8 background: red; | 8 background: red; |
9 -webkit-transition-property: top, background; | 9 -webkit-transition-property: top, background; |
10 -webkit-transition-duration: 200ms; | 10 -webkit-transition-duration: 200ms; |
11 -webkit-transform: translateZ(0); | 11 -webkit-transform: translateZ(0); |
12 } | 12 } |
13 </style> | 13 </style> |
14 <script> | 14 <script> |
15 if (window.testRunner) { | 15 if (window.testRunner) { |
16 testRunner.waitUntilDone(); | 16 testRunner.waitUntilDone(); |
17 } | 17 } |
18 onload = function() { | 18 onload = function() { |
19 var target = document.getElementById('target'); | 19 var target = document.getElementById('target'); |
20 target.style.top = '100px'; | 20 target.style.top = '100px'; |
21 target.style.background = 'green'; | 21 target.style.background = 'green'; |
22 if (window.testRunner) | |
23 testRunner.display(); | |
24 } | 22 } |
25 if (window.testRunner) { | 23 if (window.testRunner) { |
26 document.addEventListener('transitionend', function() { | 24 document.addEventListener('transitionend', function() { |
27 testRunner.notifyDone(); | 25 testRunner.notifyDone(); |
28 }); | 26 }); |
29 } | 27 } |
30 </script> | 28 </script> |
31 <div id="target">This box should transition from red to green.</div> | 29 <div id="target">This box should transition from red to green.</div> |
OLD | NEW |