Commit f5cb4250 authored by darin@chromium.org's avatar darin@chromium.org
Browse files

2010-04-02 Darin Fisher <darin@chromium.org>

        Reviewed by Adam Barth.

        https://bugs.webkit.org/show_bug.cgi?id=36647
        Make replacestate-in-frame.html less insane and hopefully no longer flaky.

        * fast/loader/stateobjects/replacestate-in-iframe-expected.txt:
        * fast/loader/stateobjects/replacestate-in-iframe.html:
        * fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html: Added.
        * fast/loader/stateobjects/resources/replacestate-in-iframe-window.html: Added.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57042 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 7a8fde5a
2010-04-02 Darin Fisher <darin@chromium.org>
Reviewed by Adam Barth.
https://bugs.webkit.org/show_bug.cgi?id=36647
Make replacestate-in-frame.html less insane and hopefully no longer flaky.
* fast/loader/stateobjects/replacestate-in-iframe-expected.txt:
* fast/loader/stateobjects/replacestate-in-iframe.html:
* fast/loader/stateobjects/resources/replacestate-in-iframe-window-child.html: Added.
* fast/loader/stateobjects/resources/replacestate-in-iframe-window.html: Added.
2010-04-02 Justin Schuh <jschuh@chromium.org>
 
Reviewed by Alexey Proskuryakov.
......
......@@ -3,9 +3,5 @@ frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)
ALERT: Navigating back...
main frame - has 1 onunload handler(s)
frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)
default text
--------
Frame: '<!--framePath //<!--frame0-->-->'
--------
foo
ALERT: onpopstate
PASS
<script>
if (parent == window && window.layoutTestController) {
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.dumpChildFramesAsText();
layoutTestController.setCanOpenWindows();
layoutTestController.waitUntilDone();
}
function runTest() {
frames[0].history.replaceState("foo", "foo", "#foo");
location = "resources/navigate-back.html";
}
// This is a test that replaceState called on an inner frame does not modify
// the history state of the top frame. The test asserts that the inner frame
// remains the inner frame and is not promoted to become the top frame during
// history traversal (on navigating back).
var testWin;
function notifyDone(result) {
testWin.close();
delete testWin;
document.body.innerText = result;
onpopstate = function(e) {
document.body.innerText = e.state;
if (window.layoutTestController)
layoutTestController.notifyDone();
}
onload = function() {
if (parent == window) {
var f = document.createElement("iframe");
f.src = location;
f.onload = function() { setTimeout(runTest, 0); };
document.body.appendChild(f);
}
function windowLoaded() {
// Allow load processing to complete before we start navigating again, so
// that navigating to navigate-back.html creates a new history item.
setTimeout(function() {
testWin.frames[0].history.replaceState(null, null);
testWin.location = "resources/navigate-back.html";
}, 0);
}
onunload = function() {
// disable page cache
onload = function() {
testWin = open("resources/replacestate-in-iframe-window.html");
testWin.onload = windowLoaded;
}
</script>
<body>default text</body>
<body>PENDING</body>
<script>
onunload = function() {
// No page cache
}
onpopstate = function(e) {
alert("onpopstate");
top.opener.notifyDone(window == parent ? "FAIL" : "PASS");
}
</script>
<script>
onunload = function() {
// no page cache
}
</script>
<iframe src="replacestate-in-iframe-window-child.html">
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment