blob: 44366f5923c2e2f69941a8d45aceb1a342512bc3 [file] [log] [blame]
<html>
<body>
<div id="result"></div>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
function done()
{
testRunner.notifyDone();
}
function iframeLoadFinished()
{
if (window.testRunner)
setTimeout(done, 0);
}
function loadAfterPrefetch()
{
var newIframe = document.createElement("iframe");
newIframe.src = "http://localhost:8000/cache/resources/prefetched-main-resource-iframe.php";
newIframe.onload = iframeLoadFinished;
document.body.appendChild(newIframe);
}
window.onmessage = function(message)
{
document.getElementById('result').textContent = message.data;
}
</script>
<link rel="prefetch" href="http://localhost:8000/cache/resources/prefetched-main-resource-iframe.php" onload="setTimeout(loadAfterPrefetch, 0);">
</body>
</html>