blob: 48972d8a6daf5686ea9c182fda1b9e861e9943df [file] [log] [blame]
<script src="/js-test-resources/js-test-pre.js"></script>
<script>
jsTestIsAsync = true;
description("Verify that document loaded with 304 response can be reloaded correctly.");
var iframe;
function loadFrame(onload)
{
if (iframe)
document.body.removeChild(iframe);
iframe = document.createElement("iframe");
iframe.src = "resources/iframe304body.php";
iframe.onload = onload;
document.body.appendChild(iframe);
}
function verify() {
shouldBeEqualToString("iframe.contentDocument.body.textContent", "body text");
}
function test() {
loadFrame(function () {
verify();
loadFrame(function () {
verify();
iframe.onload = function () {
verify();
finishJSTest();
};
debug("Reloading");
iframe.contentWindow.internals.forceReload(false);
});
});
}
</script>
</head>
<body onload="test()">
<script src="/js-test-resources/js-test-post.js"></script>