<body>
<script>
document.body.offsetWidth;

internals.startTrackingRepaints();
let initialRects;
setTimeout(() => {
   initialRects = internals.repaintRectsAsText();
   internals.stopTrackingRepaints();
}, 0);
</script>
<div style="width:100px; height:100px; background-color:green"></div>
<link rel="stylesheet" href="resources/delayed-css.py?delay=300">
<script>
internals.startTrackingRepaints();
</script>
<div class=delayed style="width:100px; height:100px; background-color:red"></div>
<script>
let finalRects = internals.repaintRectsAsText();
internals.stopTrackingRepaints();
document.body.innerHTML += `<p>
    Before stylesheet load: ${initialRects}<br>
    After stylesheet load: ${finalRects}<br>
</p>`;
</script>
