Bug 1375833 - Part 4.1: Revert test_bug123696.html & update file_bug1326251.html. r?smaug draft
authorSamael Wang <freesamael@gmail.com>
Mon, 21 Aug 2017 18:28:53 +0800
changeset 649817 fe1eb783520ff4dc7b8caeb6b88bcbdfe161a9b9
parent 647204 b4e171efb5be126461be78bdd3d1ae1a916a8dac
child 649818 a08184394387e45b5dc33c94507800092dbd2a20
child 650259 4af4cf860de37eb97e5321ce68e333787cf9f07f
child 651945 3ce75c868e6ea15169fe73564fdd8b335361e99c
push id75164
push userbmo:sawang@mozilla.com
push dateMon, 21 Aug 2017 10:38:58 +0000
reviewerssmaug
bugs1375833, 123696, 1326251
milestone57.0a1
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
docshell/test/navigation/file_bug1326251.html
docshell/test/test_bug123696.html
--- 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()";
 });