Backed out changeset 8141b60030b9 (bug 1454820) for browser chrome failures on browser_901207_searchbar_in_panel.js on Linux debug. CLOSED TREE
authorCosmin Sabou <csabou@mozilla.com>
Fri, 27 Apr 2018 09:20:20 +0300
changeset 472054 8229360171458d5e2a36fd562e9ba1da6af9b6ba
parent 472053 61784cdfb9059f0a9849d6423eba6cc5fceaaab3
child 472103 d2d518b1f8730eb61554df7179ef9a2aeed4d843
child 472105 35223e75d84e21ff40c0833fb4cf02547941d361
push id1728
push userjlund@mozilla.com
push dateMon, 18 Jun 2018 21:12:27 +0000
treeherdermozilla-release@c296fde26f5f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1454820
milestone61.0a1
backs out8141b60030b908c1f291979d72e0f21db8206c5c
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 8141b60030b9 (bug 1454820) for browser chrome failures on browser_901207_searchbar_in_panel.js on Linux debug. CLOSED TREE
toolkit/components/extensions/Extension.jsm
toolkit/components/extensions/ExtensionTestCommon.jsm
toolkit/components/extensions/test/xpcshell/test_ext_experiments.js
toolkit/components/extensions/test/xpcshell/test_ext_schemas_interactive.js
toolkit/mozapps/extensions/internal/XPIProvider.jsm
--- a/toolkit/components/extensions/Extension.jsm
+++ b/toolkit/components/extensions/Extension.jsm
@@ -624,17 +624,17 @@ class ExtensionData {
         scopes: data.scopes,
       });
 
       let computeModuleInit = (scope, modules) => {
         let manager = new ExtensionCommon.SchemaAPIManager(scope);
         return manager.initModuleJSON([modules]);
       };
 
-      if (this.experimentsAllowed && manifest.experiment_apis) {
+      if (manifest.experiment_apis) {
         let parentModules = {};
         let childModules = {};
 
         for (let [name, data] of Object.entries(manifest.experiment_apis)) {
           let schema = this.getURL(data.schema);
 
           if (!schemaPromises.has(schema)) {
             schemaPromises.set(schema, this.readJSON(data.schema).then(json => Schemas.processSchema(json)));
@@ -1343,18 +1343,16 @@ class Extension extends ExtensionData {
   }
 
   get manifestCacheKey() {
     return [this.id, this.version, Services.locale.getAppLocaleAsLangTag()];
   }
 
   get isPrivileged() {
     return (this.addonData.signedState === AddonManager.SIGNEDSTATE_PRIVILEGED ||
-            this.addonData.signedState === AddonManager.SIGNEDSTATE_SYSTEM ||
-            this.addonData.builtIn ||
             (AppConstants.MOZ_ALLOW_LEGACY_EXTENSIONS &&
              this.addonData.temporarilyInstalled));
   }
 
   get experimentsAllowed() {
     return (AddonSettings.ALLOW_LEGACY_EXTENSIONS ||
             this.isPrivileged);
   }
--- a/toolkit/components/extensions/ExtensionTestCommon.jsm
+++ b/toolkit/components/extensions/ExtensionTestCommon.jsm
@@ -368,25 +368,18 @@ var ExtensionTestCommon = class Extensio
       } else if (data.manifest.browser_specific_settings && data.manifest.browser_specific_settings.gecko) {
         id = data.manifest.browser_specific_settings.gecko.id;
       }
     }
     if (!id) {
       id = uuidGen.generateUUID().number;
     }
 
-    let signedState = AddonManager.SIGNEDSTATE_SIGNED;
-    if (data.isPrivileged) {
-      signedState = AddonManager.SIGNEDSTATE_PRIVILEGED;
-    }
-    if (data.isSystem) {
-      signedState = AddonManager.SIGNEDSTATE_SYSTEM;
-    }
-
     return new Extension({
       id,
       resourceURI: jarURI,
       cleanupFile: file,
-      signedState,
+      signedState: data.isPrivileged ? AddonManager.SIGNEDSTATE_PRIVILEGED
+                                     : AddonManager.SIGNEDSTATE_SIGNED,
       temporarilyInstalled: !!data.temporarilyInstalled,
     });
   }
 };
--- a/toolkit/components/extensions/test/xpcshell/test_ext_experiments.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_experiments.js
@@ -102,70 +102,45 @@ async function testFooExperiment() {
 
   browser.test.assertEq("child", browser.experiments.foo.child(),
                         "foo.child()");
 
   browser.test.assertEq("parent", await browser.experiments.foo.parent(),
                         "await foo.parent()");
 }
 
-async function testFooFailExperiment() {
-  browser.test.assertEq("object", typeof browser.experiments,
-                        "typeof browser.experiments");
-
-  browser.test.assertEq("undefined", typeof browser.experiments.foo,
-                        "typeof browser.experiments.foo");
-}
-
 add_task(async function test_bundled_experiments() {
-  let testCases = [
-    {isSystem: true, temporarilyInstalled: true, shouldHaveExperiments: true},
-    {isSystem: true, temporarilyInstalled: false, shouldHaveExperiments: true},
-    {isPrivileged: true, temporarilyInstalled: true, shouldHaveExperiments: true},
-    {isPrivileged: true, temporarilyInstalled: false, shouldHaveExperiments: true},
-    {isPrivileged: false, temporarilyInstalled: true, shouldHaveExperiments: true},
-    {isPrivileged: false, temporarilyInstalled: false, shouldHaveExperiments: false},
-  ];
-
-  async function background(shouldHaveExperiments) {
-    if (shouldHaveExperiments) {
-      await testFooExperiment();
-    } else {
-      await testFooFailExperiment();
-    }
+  async function background() {
+    await testFooExperiment();
 
     browser.test.notifyPass("background.experiments.foo");
   }
 
-  for (let testCase of testCases) {
-    let extension = ExtensionTestUtils.loadExtension({
-      isPrivileged: testCase.isPrivileged,
-      isSystem: testCase.isSystem,
-      temporarilyInstalled: testCase.temporarilyInstalled,
+  let extension = ExtensionTestUtils.loadExtension({
+    isPrivileged: true,
 
-      manifest: {
-        experiment_apis: fooExperimentAPIs,
-      },
+    manifest: {
+      experiment_apis: fooExperimentAPIs,
+    },
 
-      background: `
-        ${testFooExperiment}
-        ${testFooFailExperiment}
-        (${background})(${testCase.shouldHaveExperiments});
-      `,
+    background: `
+      ${testFooExperiment}
+      (${background})();
+    `,
+
+    files: fooExperimentFiles,
+  });
 
-      files: fooExperimentFiles,
-    });
+  await extension.startup();
 
-    await extension.startup();
+  await extension.awaitFinish("background.experiments.foo");
 
-    await extension.awaitFinish("background.experiments.foo");
+  await extension.unload();
+});
 
-    await extension.unload();
-  }
-});
 
 add_task(async function test_unbundled_experiments() {
   async function background() {
     await testFooExperiment();
 
     browser.test.assertEq("object", typeof browser.experiments.crunk,
                           "typeof browser.experiments.crunk");
 
--- a/toolkit/components/extensions/test/xpcshell/test_ext_schemas_interactive.js
+++ b/toolkit/components/extensions/test/xpcshell/test_ext_schemas_interactive.js
@@ -86,17 +86,16 @@ function setHandlingUserInput(extension)
                       .getInterface(Ci.nsIDOMWindowUtils);
   return winutils.setHandlingUserInput(true);
 }
 
 // Test that the schema requireUserInput flag works correctly for
 // proxied api implementations.
 add_task(async function test_proxy() {
   let extension = ExtensionTestUtils.loadExtension({
-    isPrivileged: true,
     background() {
       browser.test.onMessage.addListener(async () => {
         try {
           await browser.userinputtest.test();
           browser.test.sendMessage("result", null);
         } catch (err) {
           browser.test.sendMessage("result", err.message);
         }
@@ -124,17 +123,16 @@ add_task(async function test_proxy() {
 
   await extension.unload();
 });
 
 // Test that the schema requireUserInput flag works correctly for
 // non-proxied api implementations.
 add_task(async function test_local() {
   let extension = ExtensionTestUtils.loadExtension({
-    isPrivileged: true,
     background() {
       browser.test.onMessage.addListener(async () => {
         try {
           await browser.userinputtest.child();
           browser.test.sendMessage("result", null);
         } catch (err) {
           browser.test.sendMessage("result", err.message);
         }
--- a/toolkit/mozapps/extensions/internal/XPIProvider.jsm
+++ b/toolkit/mozapps/extensions/internal/XPIProvider.jsm
@@ -2705,17 +2705,16 @@ var XPIProvider = {
       let installLocation = aAddon._installLocation || null;
       let params = {
         id: aAddon.id,
         version: aAddon.version,
         installPath: aFile.clone(),
         resourceURI: getURIForResourceInFile(aFile, ""),
         signedState: aAddon.signedState,
         temporarilyInstalled: installLocation == TemporaryInstallLocation,
-        builtIn: installLocation instanceof BuiltInInstallLocation,
       };
 
       if (aMethod == "startup" && aAddon.startupData) {
         params.startupData = aAddon.startupData;
       }
 
       if (aExtraParams) {
         for (let key in aExtraParams) {