<!DOCTYPE html>
<script src="resources/text-based-repaint.js"></script>
<script>
function repaintTest() {
document.getElementById('iframe').contentDocument.getElementById('div').style.backgroundColor = 'green';
}
onload = runRepaintAndPixelTest;
</script>
<div style="transform: scale(0.5); transform-origin: 0 0">
<iframe id="iframe" style="width: 800px; height: 800px"
srcdoc="<div id='div' style='position: absolute; top: 400px; left: 400px; width: 200px; height: 200px; background-color: red'></div>">
</iframe>
</div>
<p style="position: absolute; top: 400px">
Tests paint invalidation in a scaled iframe. Passes if there is no red.
</p>