Backed out changeset fe57f5f7b49d (bug 1319596) for frequent failures in browser_tab_restore.js
authorPhil Ringnalda <philringnalda@gmail.com>
Thu, 24 Nov 2016 22:32:59 -0800
changeset 324231 e61a652b3f585b4e0993fea48b109fbc38d8df9e
parent 324230 a79e0f500e85dd0da9aeca1801ccee6ed258b884
child 324232 df6b2f6295009fbe4158b8e3e703cede5e854ed2
push id24
push usermaklebus@msu.edu
push dateTue, 20 Dec 2016 03:11:33 +0000
bugs1319596
milestone53.0a1
backs outfe57f5f7b49d41f66f63427770a74891beb84f9b
Backed out changeset fe57f5f7b49d (bug 1319596) for frequent failures in browser_tab_restore.js
devtools/client/responsive.html/browser/tunnel.js
devtools/client/responsive.html/test/browser/browser.ini
devtools/client/responsive.html/test/browser/browser_tab_restore.js
--- a/devtools/client/responsive.html/browser/tunnel.js
+++ b/devtools/client/responsive.html/browser/tunnel.js
@@ -307,18 +307,17 @@ function copyPermanentKey(outer, inner) 
   // outer browser (that we're hiding the inner browser within) as part of its history.
   // We want SessionStore's view of the history for our tab to only have the page content
   // of the inner browser, so we want to hide this message from SessionStore, but we have
   // no direct mechanism to do so.  As a workaround, we wait until the one errant message
   // has gone by, and then we copy the permanentKey after that, since the permanentKey is
   // what SessionStore uses to identify each browser.
   let outerMM = outer[FRAME_LOADER].messageManager;
   let onHistoryEntry = message => {
-    let data = message.data.data;
-    let history = data.history || data.historychange;
+    let history = message.data.data.history;
     if (!history || !history.entries) {
       // Wait for a message that contains history data
       return;
     }
     outerMM.removeMessageListener("SessionStore:update", onHistoryEntry);
     debug("Got session update for outer browser");
     DevToolsUtils.executeSoon(() => {
       debug("Copy inner permanentKey to outer browser");
--- a/devtools/client/responsive.html/test/browser/browser.ini
+++ b/devtools/client/responsive.html/test/browser/browser.ini
@@ -29,16 +29,15 @@ support-files =
 [browser_mouse_resize.js]
 [browser_navigation.js]
 [browser_network_throttling.js]
 [browser_page_state.js]
 [browser_permission_doorhanger.js]
 [browser_resize_cmd.js]
 [browser_screenshot_button.js]
 [browser_tab_close.js]
-[browser_tab_restore.js]
 [browser_tab_remoteness_change.js]
 [browser_toolbox_computed_view.js]
 [browser_toolbox_rule_view.js]
 [browser_toolbox_swap_browsers.js]
 [browser_touch_simulation.js]
 [browser_viewport_basics.js]
 [browser_window_close.js]
deleted file mode 100644
--- a/devtools/client/responsive.html/test/browser/browser_tab_restore.js
+++ /dev/null
@@ -1,30 +0,0 @@
-/* Any copyright is dedicated to the Public Domain.
-   http://creativecommons.org/publicdomain/zero/1.0/ */
-
-"use strict";
-
-// Verify RDM tab reopens to content (with RDM closed) when restoring the tab.
-
-const TEST_URL = "http://example.com/";
-
-const ss = Cc["@mozilla.org/browser/sessionstore;1"].getService(Ci.nsISessionStore);
-const { TabStateFlusher } = Cu.import("resource:///modules/sessionstore/TabStateFlusher.jsm", {});
-
-add_task(function* () {
-  // Open tab, start RDM, close tab
-  let tab = yield addTab(TEST_URL);
-  // Ensure tab state is flushed to session store before closing (so it can be restored)
-  yield TabStateFlusher.flush(tab.linkedBrowser);
-  let { ui } = yield openRDM(tab);
-  yield removeTab(tab);
-  is(ui.destroyed, true, "RDM closed");
-
-  // Restore tab
-  tab = ss.undoCloseTab(window, 0);
-  yield once(tab, "SSTabRestored");
-
-  // Check location
-  is(tab.linkedBrowser.documentURI.spec, TEST_URL, "Restored tab location to test page");
-
-  yield removeTab(tab);
-});