8 transition: left, transform
2s,
2s;
10 transform: translateX(
0);
13 .transform-transition {
14 transform: translateX(
500px);
22 transition-delay:
0.5s;
31 Each section below has two boxes, the top runs on the main thread, the bottom
32 on the compositor. The animations should be identical but start at different
35 This test is successful if the each pair of boxes are mostly in sync (there
36 might be a small offset between them).
42 <div class=
"main-thread"></div>
43 <div class=
"compositor"></div>
47 <div class=
"main-thread delay1"></div>
48 <div class=
"compositor delay1"></div>
52 <div class=
"main-thread delay2"></div>
53 <div class=
"compositor delay2"></div>
56 window
.onload = function()
58 function toggleTransition() {
59 var mainThread
= document
.querySelectorAll(".main-thread");
60 for (var i
= 0; i
< mainThread
.length
; i
++)
61 mainThread
[i
].classList
.toggle("left-transition");
62 var compositor
= document
.querySelectorAll(".compositor");
63 for (var i
= 0; i
< compositor
.length
; i
++)
64 compositor
[i
].classList
.toggle("transform-transition");
68 setTimeout(toggleTransition
, 300);
69 setTimeout(toggleTransition
, 1000);
70 setTimeout(toggleTransition
, 2500);