Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(235)

Side by Side Diff: third_party/WebKit/LayoutTests/animations/viewport-unit-animation-responsive.html

Issue 2973013002: Group all responsive animation tests together (Closed)
Patch Set: Rebase Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <style>
3 #target {
4 position: absolute;
5 width: 100px;
6 height: 100px;
7 background: blue;
8 }
9 </style>
10 This box should be located in the center of the page.
11 <div id="target"></div>
12 <script>
13 if (window.testRunner) {
14 testRunner.useUnfortunateSynchronousResizeMode();
15 testRunner.waitUntilDone();
16 }
17 function waitForCompositor() {
18 return document.body.animate({opacity: [1, 1]}, 1).finished;
19 }
20
21 var position = 'translate(calc(50vw - 50px), calc(50vh - 50px))';
22 var animation = target.animate({transform: [position, position]}, 1e10);
23 animation.ready.then(() => {
24 window.resizeTo(window.innerWidth / 2, window.innerHeight / 2);
25 }).then(waitForCompositor).then(() => {
26 if (window.testRunner) {
27 testRunner.notifyDone();
28 }
29 });
30 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698