Bug 1289723 - Fixing crashedTabs test for e10s-multi. r=mrbkap
☠☠ backed out by 8babccb56f91 ☠ ☠
authorGabor Krizsanits <gkrizsanits@mozilla.com>
Tue, 21 Feb 2017 11:27:19 +0100
changeset 373077 59d4978e8726f56e6d0ad1752a489b8cb8fcf7f8
parent 373076 4bccce8de17eda58afc4fb931685699685cf9258
child 373078 624ab6547d94741399aaadee25a858c2f5f8eb3c
push id10863
push userjlorenzo@mozilla.com
push dateMon, 06 Mar 2017 23:02:23 +0000
treeherdermozilla-aurora@0931190cd725 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmrbkap
bugs1289723
milestone54.0a1
Bug 1289723 - Fixing crashedTabs test for e10s-multi. r=mrbkap
browser/components/sessionstore/test/browser_crashedTabs.js
toolkit/content/widgets/remote-browser.xml
--- a/browser/components/sessionstore/test/browser_crashedTabs.js
+++ b/browser/components/sessionstore/test/browser_crashedTabs.js
@@ -8,17 +8,16 @@ requestLongerTimeout(10);
 const PAGE_1 = "data:text/html,<html><body>A%20regular,%20everyday,%20normal%20page.";
 const PAGE_2 = "data:text/html,<html><body>Another%20regular,%20everyday,%20normal%20page.";
 
 // Turn off tab animations for testing and use a single content process
 // for these tests since we want to test tabs within the crashing process here.
 add_task(function* test_initialize() {
   yield SpecialPowers.pushPrefEnv({
     set: [
-      [ "dom.ipc.processCount", 1 ],
       [ "browser.tabs.animate", false]
   ] });
 });
 
 // Allow tabs to restore on demand so we can test pending states
 Services.prefs.clearUserPref("browser.sessionstore.restore_on_demand");
 
 function clickButton(browser, id) {
@@ -236,17 +235,17 @@ add_task(function* test_revive_tab_from_
   gBrowser.selectedTab = newTab;
   let browser = newTab.linkedBrowser;
   ok(browser.isRemoteBrowser, "Should be a remote browser");
   yield promiseBrowserLoaded(browser);
 
   browser.loadURI(PAGE_1);
   yield promiseBrowserLoaded(browser);
 
-  let newTab2 = gBrowser.addTab();
+  let newTab2 = gBrowser.addTab("about:blank", { sameProcessAsFrameLoader: browser.frameLoader });
   let browser2 = newTab2.linkedBrowser;
   ok(browser2.isRemoteBrowser, "Should be a remote browser");
   yield promiseBrowserLoaded(browser2);
 
   browser.loadURI(PAGE_1);
   yield promiseBrowserLoaded(browser);
 
   browser.loadURI(PAGE_2);
@@ -293,17 +292,17 @@ add_task(function* test_revive_all_tabs_
 
   browser.loadURI(PAGE_1);
   yield promiseBrowserLoaded(browser);
 
   // In order to see a second about:tabcrashed page, we'll need
   // a second window, since only selected tabs will show
   // about:tabcrashed.
   let win2 = yield BrowserTestUtils.openNewBrowserWindow();
-  let newTab2 = win2.gBrowser.addTab(PAGE_1);
+  let newTab2 = win2.gBrowser.addTab(PAGE_1, { sameProcessAsFrameLoader: browser.frameLoader });
   win2.gBrowser.selectedTab = newTab2;
   let browser2 = newTab2.linkedBrowser;
   ok(browser2.isRemoteBrowser, "Should be a remote browser");
   yield promiseBrowserLoaded(browser2);
 
   browser.loadURI(PAGE_1);
   yield promiseBrowserLoaded(browser);
 
@@ -400,17 +399,17 @@ add_task(function* test_hide_restore_all
   gBrowser.selectedTab = newTab;
 
   browser.loadURI(PAGE_2);
   yield promiseBrowserLoaded(browser);
 
   // Load up a second window so we can get another tab to show
   // about:tabcrashed
   let win2 = yield BrowserTestUtils.openNewBrowserWindow();
-  let newTab3 = win2.gBrowser.addTab(PAGE_2);
+  let newTab3 = win2.gBrowser.addTab(PAGE_2, { sameProcessAsFrameLoader: browser.frameLoader });
   win2.gBrowser.selectedTab = newTab3;
   let otherWinBrowser = newTab3.linkedBrowser;
   yield promiseBrowserLoaded(otherWinBrowser);
   // We'll need to make sure the second tab's browser has finished
   // sending its AboutTabCrashedReady event before we know for
   // sure whether or not we're showing the right Restore buttons.
   let otherBrowserReady = promiseTabCrashedReady(otherWinBrowser);
 
--- a/toolkit/content/widgets/remote-browser.xml
+++ b/toolkit/content/widgets/remote-browser.xml
@@ -185,17 +185,19 @@
       <property name="fullZoom">
         <getter><![CDATA[
           return this._fullZoom;
         ]]></getter>
         <setter><![CDATA[
           let changed = val.toFixed(2) != this._fullZoom.toFixed(2);
 
           this._fullZoom = val;
-          this.messageManager.sendAsyncMessage("FullZoom", {value: val});
+          try {
+            this.messageManager.sendAsyncMessage("FullZoom", {value: val});
+          } catch(ex) {}
 
           if (changed) {
             let event = new Event("FullZoomChange", {bubbles: true});
             this.dispatchEvent(event);
           }
         ]]></setter>
       </property>
 
@@ -203,17 +205,19 @@
       <property name="textZoom">
         <getter><![CDATA[
           return this._textZoom;
         ]]></getter>
         <setter><![CDATA[
           let changed = val.toFixed(2) != this._textZoom.toFixed(2);
 
           this._textZoom = val;
-          this.messageManager.sendAsyncMessage("TextZoom", {value: val});
+          try {
+            this.messageManager.sendAsyncMessage("TextZoom", {value: val});
+          } catch(ex) {}
 
           if (changed) {
             let event = new Event("TextZoomChange", {bubbles: true});
             this.dispatchEvent(event);
           }
         ]]></setter>
       </property>