2 <script src=
"../resources/js-test.js"></script>
14 background-color: green;
21 description('This test checks that changes to the compositor\'s settings are applied correctly.');
23 function isUsingCompositedScrolling(layer
) {
24 layer
= layer
|| JSON
.parse(window
.internals
.layerTreeAsText(document
));
25 if (layer
.bounds
[1] == 1000)
28 for (var i
= 0; i
< layer
.children
.length
; i
++) {
29 if (isUsingCompositedScrolling(layer
.children
[i
]))
36 window
.onload = function() {
37 if (!window
.internals
) {
38 testFailed('This test requires window.internals');
41 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(false);
42 var stateBefore
= isUsingCompositedScrolling();
43 window
.internals
.settings
.setPreferCompositingToLCDTextEnabled(true);
44 var stateAfter
= isUsingCompositedScrolling();
46 if (!stateBefore
&& stateAfter
) {
47 testPassed('Composited scrolling became enabled.');
49 testFailed('Composited scrolling did not become enabled: ' + stateBefore
+ ", " + stateAfter
);
56 <div id=
"scrolled"></div>