<html>
<body onload="setTimeout(removeAndReload, 0);">
<div id="result"></div>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

function removeAndReload()
{
    document.body.removeChild(document.getElementById("iframe"));
    var newIframe = document.createElement("iframe");
    newIframe.src = "resources/cacheable-iframe.py";
    document.body.appendChild(newIframe);
    var fromCache = internals.isLoadingFromMemoryCache(newIframe.src);
    document.getElementById("result").appendChild(document.createTextNode(fromCache ? "PASS" : "FAIL"));
    if (window.testRunner)
        testRunner.notifyDone();
}
</script>
<iframe id="iframe" src="resources/cacheable-iframe.py"></iframe>
</body>
</html>
