4 0% { transform: translate3d(
0px,
0px,
0px); }
5 100% { transform: translate3d(
100px,
0px,
1px); }
12 animation-duration:
2s;
13 animation-name: slide;
14 animation-iteration-count: infinite;
15 animation-direction: alternate;
18 <div id=
"animated"></div>
19 <script src='../../resources/js-test.js'
></script>
22 description('Verifies hidden, compositor-animated layers still get composited');
25 internals
.settings
.setPreferCompositingToLCDTextEnabled(true);
27 function hiddenLayerIsComposited(layer
) {
29 for (var i
= 0; i
< layer
.children
.length
; i
++) {
30 var child
= layer
.children
[i
];
31 if (child
.bounds
[0] == 100 && child
.bounds
[1] == 100) {
32 for (var j
= 0; j
< child
.compositingReasons
.length
; j
++) {
33 if (child
.compositingReasons
[j
] === 'activeAnimation')
37 if (hiddenLayerIsComposited(child
))
45 if (!window
.internals
)
48 document
.getElementById('animated').style
.visibility
= 'hidden';
49 window
.internals
.forceCompositingUpdate(document
);
51 documentLayerTree
= JSON
.parse(window
.internals
.layerTreeAsText(
52 document
, window
.internals
.LAYER_TREE_INCLUDES_COMPOSITING_REASONS
));
54 shouldBe('hiddenLayerIsComposited(documentLayerTree)', 'true');