OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <style> | 2 <style> |
3 #target { | 3 #target { |
4 position: absolute; | 4 position: absolute; |
5 width: 100px; | 5 width: 100px; |
6 height: 100px; | 6 height: 100px; |
7 background: blue; | 7 background: blue; |
8 } | 8 } |
9 </style> | 9 </style> |
10 This box should be located in the center of the page. | 10 This box should be located in the center of the page. |
(...skipping 10 matching lines...) Expand all Loading... |
21 var position = 'translate(calc(50vw - 50px), calc(50vh - 50px))'; | 21 var position = 'translate(calc(50vw - 50px), calc(50vh - 50px))'; |
22 var animation = target.animate({transform: [position, position]}, 1e10); | 22 var animation = target.animate({transform: [position, position]}, 1e10); |
23 animation.ready.then(() => { | 23 animation.ready.then(() => { |
24 window.resizeTo(window.innerWidth / 2, window.innerHeight / 2); | 24 window.resizeTo(window.innerWidth / 2, window.innerHeight / 2); |
25 }).then(waitForCompositor).then(() => { | 25 }).then(waitForCompositor).then(() => { |
26 if (window.testRunner) { | 26 if (window.testRunner) { |
27 testRunner.notifyDone(); | 27 testRunner.notifyDone(); |
28 } | 28 } |
29 }); | 29 }); |
30 </script> | 30 </script> |
OLD | NEW |