Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / transitions / interrupted-all-transition.html
1 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
2
3 <html>
4 <head>
5   <style>
6     #container {
7       position: relative;
8       width: 400px;
9       height: 100px;
10       border: 1px solid black;
11     }
12     #box {
13       position: absolute;
14       left: 0;
15       height: 100px;
16       width: 100px;
17       background-color: blue;
18       -webkit-transition-duration: 1s;
19       -webkit-transition-timing-function: linear;
20     }
21   </style>
22   <script>
23     if (window.testRunner) {
24       testRunner.dumpAsText();
25       testRunner.waitUntilDone();
26     }
27
28     function startTransition()
29     {
30       var box = document.getElementById('box');
31       box.style.left = '300px';
32       box.style.opacity = 0.5;
33       window.setTimeout(function() {
34         box.style.left = '0px';
35         
36         window.setTimeout(function() {
37           var boxPos = parseInt(window.getComputedStyle(box).left);
38           document.getElementById('result').innerHTML = (boxPos < 200) ? "PASS" : "FAIL";
39           if (window.testRunner)
40               testRunner.notifyDone();
41         }, 250);
42       }, 500);
43     }
44     window.addEventListener('load', startTransition, false)
45   </script>
46 </head>
47 <body>
48
49 <p>Box should start moving left after left style is reset after 500ms</p>
50 <div id="container">
51   <div id="box">
52   </div>
53 </div>
54 <div id="result">
55 </div>
56 </body>
57 </html>