Bug 1519121 - Fix browser_ext_optionsPage_popups.js test failure on 66 Beta due to userContext feature disabled. r=mixedpuppy
authorLuca Greco <lgreco@mozilla.com>
Thu, 10 Jan 2019 19:12:41 +0000
changeset 510427 9edba3987a86260f2d3136cbe23387426d4defb1
parent 510426 64a29845f509717da798cb433ac6ba9dac2ff088
child 510428 2ef82a9b2ae92e02848797f163a5cddd1840dce5
push id10547
push userffxbld-merge
push dateMon, 21 Jan 2019 13:03:58 +0000
treeherdermozilla-beta@24ec1916bffe [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmixedpuppy
bugs1519121
milestone66.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 1519121 - Fix browser_ext_optionsPage_popups.js test failure on 66 Beta due to userContext feature disabled. r=mixedpuppy Differential Revision: https://phabricator.services.mozilla.com/D16219
browser/components/extensions/test/browser/browser_ext_optionsPage_popups.js
--- a/browser/components/extensions/test/browser/browser_ext_optionsPage_popups.js
+++ b/browser/components/extensions/test/browser/browser_ext_optionsPage_popups.js
@@ -83,19 +83,24 @@ add_task(async function test_tab_options
   const optionsBrowser = gBrowser.selectedBrowser.contentDocument.getElementById("addon-options");
 
   const contentAreaContextMenu = await openContextMenuInOptionsPage(optionsBrowser);
 
   let contextMenuItemIds = [
     "context-openlinkintab",
     "context-openlinkprivate",
     "context-copylink",
-    "context-openlinkinusercontext-menu",
   ];
 
+  // Test that the "open link in container" menu is available if the containers are enabled
+  // (which is the default on Nightly, but not on Beta).
+  if (Services.prefs.getBoolPref("privacy.userContext.enabled")) {
+    contextMenuItemIds.push("context-openlinkinusercontext-menu");
+  }
+
   for (const itemID of contextMenuItemIds) {
     const item = contentAreaContextMenu.querySelector(`#${itemID}`);
 
     ok(!item.hidden, `${itemID} should not be hidden`);
     ok(!item.disabled, `${itemID} should not be disabled`);
   }
 
   const menuDetails = await extension.awaitMessage("extension-menus-onShown");