blob: c6f65cc087068a34e6789a53d6a65960141a24d1 [file] [log] [blame]
<!doctype HTML>
<head>
<script src="../resources/testharness.js"></script>
<script src="../resources/testharnessreport.js"></script>
</head>
<div style="position: fixed; width: 100px; height: 100px; background: lightgray">
<div style="will-change: transform; margin: 50px; width: 50px; height: 50px; background: lightblue"></div>
</div>
<div id="force_document_scroll" style="height: 5000px;"></div>
<script>
test(function() {
assert_not_equals(window.internals, null, 'This test requires window.internals');
var layers_text = internals.layerTreeAsText(document);
var layers = JSON.parse(layers_text);
if (internals.runtimeFlags.rootLayerScrollingEnabled) {
assert_equals(layers['layers'].length, 5);
} else {
assert_equals(layers['layers'].length, 3);
}
}, 'Having a composited child should be a position:fixed compositing trigger and should result in the fixed element getting a layer.');
</script>