<!DOCTYPE html>
<html>
<head>
<script src="../../../resources/run-after-layout-and-paint.js"></script>
<script>
function repaintTest() {
window.resizeTo(400, 300);
}
</script>
</head>
<body onload="runAfterLayoutAndPaint(repaintTest, true)">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- http://crbug.com/307161
The mask should get resized on window resize.
-->
<defs>
<mask id="mask" maskContentUnits="userSpaceOnUse">
<rect width="39%" height="59%" fill="white"/>
</mask>
</defs>
<rect width="100%" height="100%" mask="url(#mask)" fill="red"/>
<rect width="40%" height="60%" fill="green"/>
</svg>
</body>
</html>