Bug 1539688: Add a test which disables local tab debugging. r=jdescottes
authorDaisuke Akatsuka <dakatsuka@mozilla.com>
Wed, 08 May 2019 07:18:39 +0000
changeset 534910 dfcf9fbbd09fb7fb4cae5808e11b46d9b9c21184
parent 534909 340bf0a7176dfbbff8d47ad5a2df9da1715e3679
child 534911 7785e3f08f857250cc417de04d42dbd0243b802a
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjdescottes
bugs1539688
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1539688: Add a test which disables local tab debugging. r=jdescottes Depends on D30315 Differential Revision: https://phabricator.services.mozilla.com/D30316
devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_thisfirefox.js
--- a/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_thisfirefox.js
+++ b/devtools/client/aboutdebugging-new/test/browser/browser_aboutdebugging_thisfirefox.js
@@ -37,16 +37,34 @@ add_task(async function testThisFirefoxW
   // Expect all target panes but tabs to be displayed.
   const expectedTargetPanesWithoutTabs = EXPECTED_TARGET_PANES.filter(p => p !== "Tabs");
   await checkThisFirefoxTargetPanes(document, expectedTargetPanesWithoutTabs);
 
   await removeTab(tab);
 });
 
 /**
+ * Check that the tab which is discarded keeps the state after open the aboutdebugging.
+ */
+add_task(async function testThisFirefoxKeepDiscardedTab() {
+  const targetTab = await addTab("https://example.com/");
+  const blankTab = await addTab("about:blank");
+  targetTab.ownerGlobal.gBrowser.discardBrowser(targetTab);
+
+  const { document, tab, window } = await openAboutDebugging({ enableLocalTabs: false });
+  await selectThisFirefoxPage(document, window.AboutDebugging.store);
+
+  ok(!targetTab.linkedPanel, "The target tab is still discarded");
+
+  await removeTab(blankTab);
+  await removeTab(targetTab);
+  await removeTab(tab);
+});
+
+/**
  * Check that the Temporary Extensions is hidden if "xpinstall.enabled" is set to false.
  */
 add_task(async function testThisFirefoxWithXpinstallDisabled() {
   await pushPref("xpinstall.enabled", false);
 
   const { document, tab, window } = await openAboutDebugging();
   await selectThisFirefoxPage(document, window.AboutDebugging.store);
 
@@ -76,9 +94,8 @@ async function checkThisFirefoxTargetPan
 
   for (let i = 0; i < expectedTargetPanes.length; i++) {
     const expectedPaneTitle = expectedTargetPanes[i];
     const actualPaneTitle = paneTitles[i];
     ok(actualPaneTitle.startsWith(expectedPaneTitle),
        `Expected debug target category found: ${ expectedPaneTitle }`);
   }
 }
-