<!DOCTYPE html>
<script src=../../resources/run-after-layout-and-paint.js></script>
<svg width="100" height="100">
<clipPath id="clip">
<rect width="50%" height="50%"/>
<text y="25%" font-size="1px">Sabotage!</text>
</clipPath>
<rect width="50%" height="50%" fill="red"/>
<rect width="800" height="800" fill="green" clip-path="url(#clip)"/>
</svg>
<script>
runAfterLayoutAndPaint(function() {
document.querySelector('svg').setAttribute('width', '200');
document.querySelector('svg').setAttribute('height', '200');
}, true);
</script>