Backed out changeset 7a05ac03465c (bug 1539598) for turning bug 1531406 into perma on a CLOSED TREE
authorOana Pop Rus <opoprus@mozilla.com>
Thu, 04 Apr 2019 15:35:04 +0300
changeset 467986 75d0bd84d83f607fde8ed552a7c38489e848b249
parent 467985 0a10d3faab9eb28b4fecd19c05944871f4e6f466
child 467987 aa623df2ae8f9b62bf02072dd00f50688def477f
child 467996 a5bd15fbc59459da25988ce69f98c2e6c5ca05ca
push id112667
push useraiakab@mozilla.com
push dateThu, 04 Apr 2019 16:12:45 +0000
treeherdermozilla-inbound@230bb363f2f3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1539598, 1531406
milestone68.0a1
backs out7a05ac03465cb38ba5a798cb762ccf20a6635f23
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
Backed out changeset 7a05ac03465c (bug 1539598) for turning bug 1531406 into perma on a CLOSED TREE
toolkit/mozapps/extensions/AddonManager.jsm
toolkit/mozapps/extensions/test/browser/browser_webapi_theme.js
--- a/toolkit/mozapps/extensions/AddonManager.jsm
+++ b/toolkit/mozapps/extensions/AddonManager.jsm
@@ -2535,17 +2535,17 @@ var AddonManagerInternal = {
 
       // All installs end up in this callback when the add-on is available
       // for installation.  There are numerous different things that can
       // happen from here though.  For webextensions, if the application
       // implements webextension permission prompts, those always take
       // precedence.
       // If this add-on is not a webextension or if the application does not
       // implement permission prompts, no confirmation is displayed for
-      // installs created from about:addons (in which case requireConfirm
+      // installs created with mozAddonManager (in which case requireConfirm
       // is false).
       // In the remaining cases, a confirmation prompt is displayed but the
       // application may override it either by implementing the
       // "@mozilla.org/addons/web-install-prompt;1" contract or by setting
       // the customConfirmationUI preference and responding to the
       // "addon-install-confirmation" notification.  If the application
       // does not implement its own prompt, use the built-in xul dialog.
       if (info.addon.userPermissions && WEBEXT_PERMISSION_PROMPTS) {
@@ -2700,22 +2700,17 @@ var AddonManagerInternal = {
         browser: target,
         triggeringPrincipal: options.triggeringPrincipal,
         hash: options.hash,
         telemetryInfo: {
           source: AddonManager.getInstallSourceFromHost(options.sourceHost),
           method: "amWebAPI",
         },
       }).then(install => {
-        let requireConfirm = true;
-        if (target.contentDocument &&
-            target.contentDocument.nodePrincipal.isSystemPrincipal) {
-          requireConfirm = false;
-        }
-        AddonManagerInternal.setupPromptHandler(target, null, install, requireConfirm, "AMO");
+        AddonManagerInternal.setupPromptHandler(target, null, install, false, "AMO");
 
         let id = this.nextInstall++;
         let {listener, installPromise} = makeListener(id, target.messageManager);
         install.addListener(listener);
 
         this.installs.set(id, {install, target, listener, installPromise});
 
         let result = {id};
--- a/toolkit/mozapps/extensions/test/browser/browser_webapi_theme.js
+++ b/toolkit/mozapps/extensions/test/browser/browser_webapi_theme.js
@@ -16,31 +16,24 @@ add_task(async function test_theme_insta
     function observer(subject, topic, data) {
       updates.push(JSON.stringify(subject.wrappedJSObject));
     }
     Services.obs.addObserver(observer, "lightweight-theme-styling-update");
     registerCleanupFunction(() => {
       Services.obs.removeObserver(observer, "lightweight-theme-styling-update");
     });
 
-    let sawConfirm = false;
-    promisePopupNotificationShown("addon-install-confirmation").then(panel => {
-      sawConfirm = true;
-      panel.button.click();
-    });
 
     let prompt1 = waitAppMenuNotificationShown("addon-installed", "theme@tests.mozilla.org", false);
     let installPromise = ContentTask.spawn(browser, URL, async (url) => {
       let install = await content.navigator.mozAddonManager.createInstall({url});
       return install.install();
     });
     await prompt1;
 
-    ok(sawConfirm, "Confirm notification was displayed before installation");
-
     // Open a new window and test the app menu panel from there.  This verifies the
     // incognito checkbox as well as finishing install in this case.
     let newWin = await BrowserTestUtils.openNewBrowserWindow();
     await waitAppMenuNotificationShown("addon-installed", "theme@tests.mozilla.org", true, newWin);
     await installPromise;
     ok(true, "Theme install completed");
 
     await BrowserTestUtils.closeWindow(newWin);