Refactoring: Pull all fullscreen code out of Document and into its own helper class
[WebKit-https.git] / LayoutTests / transitions / transition-to-from-auto.html
1 <!DOCTYPE html><!-- webkit-test-runner [ experimental:WebAnimationsCSSIntegrationEnabled=true ] -->
2
3 <html>
4 <head>
5   <style>
6     .box {
7         position: relative;
8         height: 100px;
9         width: 100px;
10         margin: 10px;
11         background-color: gray;
12         transition: left 2s linear;
13     }
14     
15     #test1 {
16         left: 100px;
17     }
18     
19     body.final #test1 {
20         left: auto;
21     }
22
23     #test2 {
24         left: auto;
25     }
26     
27     body.final #test2 {
28         left: 100px
29     }
30
31     #test3 {
32         left: 0;
33     }
34     
35     body.final #test3 {
36         left: 100px
37     }
38   </style>
39   <script src="resources/transition-test-helpers.js"></script>
40   <script type="text/javascript">
41
42     const expectedValues = [
43       // [time, element-id, property, expected-value, tolerance]
44       [1, 'test3', 'left', '50', 2],
45     ];
46   
47     function setupTest()
48     {
49         document.body.classList.add('final');
50         result += `Total number of animations: ${document.getAnimations().length} <br>`;
51     }
52     
53     runTransitionTest(expectedValues, setupTest, usePauseAPI);
54   </script>
55 </head>
56 <body>
57   <div id="test1" class="box"></div>
58   <div id="test2" class="box"></div>
59   <div id="test3" class="box"></div>
60
61   <div id="result"></div>
62 </body>
63 </html>