Bug 1316381 - Re-enable browser_toolbox_swap_browsers.js test. r=ochameau
authorJ. Ryan Stinnett <jryans@gmail.com>
Mon, 07 Nov 2016 19:35:30 -0600
changeset 322017 666b8f65e279ffb0a2b4c02c702beba3ecdfca4b
parent 322016 720cb3b359c98ef39da959199dabdc0800f1c6db
child 322018 742ff7058a1efa990fe9eacb1b3c1bdeaad60c6b
push id21
push usermaklebus@msu.edu
push dateThu, 01 Dec 2016 06:22:08 +0000
reviewersochameau
bugs1316381
milestone52.0a1
Bug 1316381 - Re-enable browser_toolbox_swap_browsers.js test. r=ochameau MozReview-Commit-ID: LNwvso1tBL8
devtools/client/responsive.html/test/browser/browser_toolbox_swap_browsers.js
--- a/devtools/client/responsive.html/test/browser/browser_toolbox_swap_browsers.js
+++ b/devtools/client/responsive.html/test/browser/browser_toolbox_swap_browsers.js
@@ -34,45 +34,49 @@ add_task(function* setup() {
   yield SpecialPowers.pushPrefEnv({
     set: [["dom.ipc.processCount", 1]]
   });
 });
 
 add_task(function* () {
   let tab = yield addTab(TEST_URL);
 
+  let tabsInDifferentProcesses = E10S_MULTI_ENABLED &&
+    (gBrowser.tabs[0].linkedBrowser.frameLoader.childID !=
+     gBrowser.tabs[1].linkedBrowser.frameLoader.childID);
+
   info("Open toolbox outside RDM");
   {
     // 0: No DevTools connections yet
     yield checkServerConnectionCount(tab.linkedBrowser, 0,
       "0: No DevTools connections yet");
     let { toolbox } = yield openInspector();
-    if (E10S_MULTI_ENABLED) {
+    if (tabsInDifferentProcesses) {
       // 1: Two tabs open, but only one per content process
       yield checkServerConnectionCount(tab.linkedBrowser, 1,
         "1: Two tabs open, but only one per content process");
     } else {
       // 2: One for each tab (starting tab plus the one we opened)
       yield checkServerConnectionCount(tab.linkedBrowser, 2,
         "2: One for each tab (starting tab plus the one we opened)");
     }
     yield checkToolbox(tab, "outside RDM");
     let { ui } = yield openRDM(tab);
-    if (E10S_MULTI_ENABLED) {
+    if (tabsInDifferentProcesses) {
       // 2: RDM UI adds an extra connection, 1 + 1 = 2
       yield checkServerConnectionCount(ui.getViewportBrowser(), 2,
         "2: RDM UI uses an extra connection");
     } else {
       // 3: RDM UI adds an extra connection, 2 + 1 = 3
       yield checkServerConnectionCount(ui.getViewportBrowser(), 3,
         "3: RDM UI uses an extra connection");
     }
     yield checkToolbox(tab, "after opening RDM");
     yield closeRDM(tab);
-    if (E10S_MULTI_ENABLED) {
+    if (tabsInDifferentProcesses) {
       // 1: RDM UI closed, return to previous connection count
       yield checkServerConnectionCount(tab.linkedBrowser, 1,
         "1: RDM UI closed, return to previous connection count");
     } else {
       // 2: RDM UI closed, return to previous connection count
       yield checkServerConnectionCount(tab.linkedBrowser, 2,
         "2: RDM UI closed, return to previous connection count");
     }
@@ -88,28 +92,28 @@ add_task(function* () {
     // 0: No DevTools connections yet
     yield checkServerConnectionCount(tab.linkedBrowser, 0,
       "0: No DevTools connections yet");
     let { ui } = yield openRDM(tab);
     // 1: RDM UI uses an extra connection
     yield checkServerConnectionCount(ui.getViewportBrowser(), 1,
       "1: RDM UI uses an extra connection");
     let { toolbox } = yield openInspector();
-    if (E10S_MULTI_ENABLED) {
+    if (tabsInDifferentProcesses) {
       // 2: Two tabs open, but only one per content process
       yield checkServerConnectionCount(ui.getViewportBrowser(), 2,
         "2: Two tabs open, but only one per content process");
     } else {
       // 3: One for each tab (starting tab plus the one we opened)
       yield checkServerConnectionCount(ui.getViewportBrowser(), 3,
         "3: One for each tab (starting tab plus the one we opened)");
     }
     yield checkToolbox(tab, ui.getViewportBrowser(), "inside RDM");
     yield closeRDM(tab);
-    if (E10S_MULTI_ENABLED) {
+    if (tabsInDifferentProcesses) {
       // 1: RDM UI closed, one less connection
       yield checkServerConnectionCount(tab.linkedBrowser, 1,
         "1: RDM UI closed, one less connection");
     } else {
       // 2: RDM UI closed, one less connection
       yield checkServerConnectionCount(tab.linkedBrowser, 2,
         "2: RDM UI closed, one less connection");
     }