Bug 1375833 - Part 4.2 - Fix session store test case. r?mikedeboer
Previously gecko would drop all subframe history entries on reloading if there
exists one or more dynamic subframes. With
bug 1326251 and this bug, now that
dynamic frame entries are bound to bfcache (so they're still dropped on
reloading) but static entries are always kept in normal reloads.
Force reload would still drop all subframes regardless they're static or
dynamic, so for this test case I think we should just use a force reload.
MozReview-Commit-ID: 2mZZa59RMHB
--- a/browser/components/sessionstore/test/browser_705597.js
+++ b/browser/components/sessionstore/test/browser_705597.js
@@ -37,21 +37,21 @@ function test() {
ok(!entries[0].children, "history entry has no subframes");
// Make sure that we reset the state.
let blankState = { windows: [{ tabs: [{ entries: [{ url: "about:blank",
triggeringPrincipal_base64}] }]}]};
waitForBrowserState(blankState, finish);
});
- // reload the browser to deprecate the subframes
- browser.reload();
+ // Force reload the browser to deprecate the subframes.
+ browser.reloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
});
- // create a dynamic subframe
+ // Create a dynamic subframe.
let doc = browser.contentDocument;
let iframe = doc.createElement("iframe");
doc.body.appendChild(iframe);
iframe.setAttribute("src", "about:mozilla");
});
});
}
--- a/browser/components/sessionstore/test/browser_707862.js
+++ b/browser/components/sessionstore/test/browser_707862.js
@@ -36,21 +36,21 @@ function test() {
whenChildCount(newEntry, 0, function() {
// Make sure that we reset the state.
let blankState = { windows: [{ tabs: [{ entries: [{ url: "about:blank",
triggeringPrincipal_base64 }] }]}]};
waitForBrowserState(blankState, finish);
});
});
- // reload the browser to deprecate the subframes
- browser.reload();
+ // Force reload the browser to deprecate the subframes.
+ browser.reloadWithFlags(Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CACHE);
});
- // create a dynamic subframe
+ // Create a dynamic subframe.
let doc = browser.contentDocument;
let iframe = doc.createElement("iframe");
doc.body.appendChild(iframe);
iframe.setAttribute("src", "about:mozilla");
});
});
// This test relies on the test timing out in order to indicate failure so