<html>
<body>
<iframe src="/slow?100" id="iframe"></iframe>
<script>
// slow takes 100 seconds to load, plenty of time to overwrite the
// provisional load.
iframe = document.getElementById("iframe");
doc = iframe.contentDocument;
doc.open();
doc.write("<html><body>Rewritten. <img src='/ad_tagging/pixel.png?ad=true'"
+ " onload='parent.document.title = \"loaded\";'"
+ " onerror='parent.document.title = \"failed\";'></body></html>");
doc.close();
</script>
</body>
</html>