Bug 1375833 - Part 4.1: Revert test_bug123696.html & update file_bug1326251.html. r?smaug
Revert test_bug123696.html to what it was before
bug 1326251 laned. Update
file_bug1326251.html to reflect the change that static frame entries won't be
cleared on reloading.
MozReview-Commit-ID: F93ZBNv1Gj
--- a/docshell/test/navigation/file_bug1326251.html
+++ b/docshell/test/navigation/file_bug1326251.html
@@ -116,37 +116,37 @@
opener.is(shistory.index, 4, 'shistory.index');
opener.is(history.length, 6, 'history.length');
let staticFrame = document.getElementById('staticFrame');
let innerStaticFrame = staticFrame.contentDocument.getElementById('staticFrame');
opener.is(innerStaticFrame.contentDocument.location.href, BASE_URL + 'frame1.html', 'innerStaticFrame location');
opener.ok(!staticFrame.contentDocument.getElementById('dynamicFrame'), 'innerDynamicFrame should not exist');
// Test 6: Insert and navigate inner dynamic frame and then reload outer
- // frame. Verify that inner frame entries are all removed.
+ // frame. Verify that inner dynamic frame entries are all removed.
staticFrame.width = '320px';
staticFrame.height = '360px';
let innerDynamicFrame = await createDynamicFrame(staticFrame.contentDocument, 'frame2.html');
await loadUriInFrame(innerDynamicFrame, 'frame3.html');
// staticFrame: frame0 -> frame1 -> frame2 -> iframe_static
// innerStaticFrame: frame0 -> frame1
// innerDynamicFrame: frame2 -> frame3
opener.is(shistory.index, 5, 'shistory.index');
opener.is(history.length, 6, 'history.length');
let staticFrameLoadPromise = new Promise(resolve => {
staticFrame.onload = resolve;
});
staticFrame.contentWindow.location.reload();
await staticFrameLoadPromise;
// staticFrame: frame0 -> frame1 -> frame2 -> iframe_static
- // innerStaticFrame: frame0
- opener.is(shistory.index, 3, 'shistory.index');
- opener.is(history.length, 4, 'history.length');
+ // innerStaticFrame: frame0 -> frame1
+ opener.is(shistory.index, 4, 'shistory.index');
+ opener.is(history.length, 5, 'history.length');
innerStaticFrame = staticFrame.contentDocument.getElementById('staticFrame');
- opener.is(innerStaticFrame.contentDocument.location.href, BASE_URL + 'frame0.html', 'innerStaticFrame location');
+ opener.is(innerStaticFrame.contentDocument.location.href, BASE_URL + 'frame1.html', 'innerStaticFrame location');
opener.ok(!staticFrame.contentDocument.getElementById('dynamicFrame'), 'innerDynamicFrame should not exist');
opener.nextTest();
window.close();
}
];
function awaitOnload(frame, occurances=1) {
return new Promise(function(resolve, reject) {
--- a/docshell/test/test_bug123696.html
+++ b/docshell/test/test_bug123696.html
@@ -24,18 +24,18 @@ SimpleTest.waitForExplicitFinish();
function finishTest() {
is(window.frames[0].frames[0].document.documentElement.textContent,
"change2", "Reload should have reloaded correctly!");
SimpleTest.finish();
}
function doReload() {
- window.frames[0].frames[0].frameElement.onload = finishTest;
- window.frames[0].frames[0].location.reload();
+ window.frames[0].frameElement.onload = finishTest;
+ window.frames[0].location.reload();
}
addLoadEvent(function() {
window.frames[0].frames[0].frameElement.onload = doReload;
window.frames[0].frames[0].frameElement.src = "javascript:parent.change2()";
});