<!DOCTYPE html>
<script>
if (window.internal)
internal.settings.setPreferCompositingToLCDText(true);
</script>
<body style="background: linear-gradient(white, lightgray); background-attachment: fixed">
<div id="div" style="width: 100px; height: 100px; background-color: red"></div>
<div style="height: 2000px; position: relative">
Tests descendant background change in a view having composited background.
Passes if there is a green square.
</div>
</body>
<script src="../../../resources/run-after-layout-and-paint.js"></script>
<script>
runAfterLayoutAndPaint(function() {
div.style.backgroundColor = 'green';
}, true);
</script>