blob: 862ba02b15f62eb34287fa58f44cb5eb47f9c9b6 [file] [log] [blame]
graouts@webkit.org447e3d92020-09-17 12:39:28 +00001<!DOCTYPE html>
dino@apple.comeff03da2008-07-17 01:16:30 +00002
simon.fraser@apple.com4803cdd2011-04-26 03:25:14 +00003<html>
dino@apple.comeff03da2008-07-17 01:16:30 +00004<head>
simon.fraser@apple.com4803cdd2011-04-26 03:25:14 +00005 <style>
dino@apple.comeff03da2008-07-17 01:16:30 +00006 .container {
7 position: relative;
8 height: 300px;
9 width: 300px;
10 margin: 10px;
11 background-color: green;
12 -webkit-transition-property: opacity;
13 -webkit-transition-timing-function: linear;
14 -webkit-transition-duration: 5s;
15 }
16
17 #first {
18 opacity: 0.5;
19 }
20
21 .box {
22 position: absolute;
23 left: 10px;
24 top: 10px;
25 height: 200px;
26 width: 200px;
27 background-color: blue;
28 }
29
30 .indicator {
31 position: absolute;
32 top: 150px;
33 left: 150px;
34 height: 100px;
35 width: 100px;
36 background-color: orange;
37 z-index: -1;
38 }
39 </style>
simon.fraser@apple.com4803cdd2011-04-26 03:25:14 +000040 <script>
rniwa@webkit.orgcc082ecd2012-06-16 03:42:58 +000041 if (window.testRunner)
42 testRunner.waitUntilDone();
dino@apple.comeff03da2008-07-17 01:16:30 +000043
44 function runTest()
45 {
46 var container = document.getElementById('first');
47 container.style.opacity = 1;
pol@apple.com8ceda8d2008-12-19 00:39:21 +000048
dino@apple.comeff03da2008-07-17 01:16:30 +000049 // dump the tree in the middle of the transition
benjamin@webkit.org84dbb0d2013-02-07 21:34:32 +000050 if (window.testRunner)
51 window.setTimeout(function() {
52 var firstElement = document.getElementById('first');
graouts@webkit.orga4438cc2018-03-29 06:49:27 +000053 const transition = firstElement.getAnimations()[0];
54 transition.currentTime = 2500;
55 transition.pause();
benjamin@webkit.org84dbb0d2013-02-07 21:34:32 +000056 testRunner.notifyDone();
57 }, 0);
dino@apple.comeff03da2008-07-17 01:16:30 +000058 }
simon.fraser@apple.com3d92c2b2011-04-26 21:49:10 +000059 // FIXME: this should use runTransitionTest().
dino@apple.comeff03da2008-07-17 01:16:30 +000060 window.addEventListener('load', runTest, false);
61 </script>
62</head>
63<body>
64
65 <div class="container" id="first">
66 <div class="box"></div>
67 <div class="indicator"></div>
68 </div>
69
70</body>
71</html>