<!DOCTYPE html>
<script>
function test() {
    if (window.testRunner)
        testRunner.dumpAsText()
    document.documentElement.replaceWith(foreignObject);
}
</script>
<body onload="test()">
<svg>
<foreignObject id="foreignObject">
</svg>
</body>
