Bug 1357490: Part 2: Run browser xpcshell tests in both in-process and OOP modes. r=aswan
authorKris Maglione <maglione.k@gmail.com>
Mon, 29 May 2017 14:10:27 -0700
changeset 367904 9cdcf786a597cd6654f50c1f24394c645fbcca6a
parent 367903 9704283b0e3aa4d0e25b8ff79c4a12b4175ea220
child 367905 b7230328f99d18b1e263c8b300c045342f3b3f0a
push id92356
push usermaglione.k@gmail.com
push dateSun, 09 Jul 2017 00:51:29 +0000
treeherdermozilla-inbound@a625a2e9b333 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersaswan
bugs1357490
milestone56.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 1357490: Part 2: Run browser xpcshell tests in both in-process and OOP modes. r=aswan MozReview-Commit-ID: 1ogotK4j3cy
browser/components/extensions/moz.build
browser/components/extensions/test/xpcshell/head.js
browser/components/extensions/test/xpcshell/head_remote.js
browser/components/extensions/test/xpcshell/xpcshell-common.ini
browser/components/extensions/test/xpcshell/xpcshell-remote.ini
browser/components/extensions/test/xpcshell/xpcshell.ini
--- a/browser/components/extensions/moz.build
+++ b/browser/components/extensions/moz.build
@@ -22,9 +22,12 @@ EXTRA_JS_MODULES += [
 DIRS += ['schemas']
 
 BROWSER_CHROME_MANIFESTS += [
     'test/browser/browser-remote.ini',
     'test/browser/browser.ini',
 ]
 
 MOCHITEST_MANIFESTS += ['test/mochitest/mochitest.ini']
-XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell/xpcshell.ini']
+XPCSHELL_TESTS_MANIFESTS += [
+    'test/xpcshell/xpcshell-remote.ini',
+    'test/xpcshell/xpcshell.ini',
+]
--- a/browser/components/extensions/test/xpcshell/head.js
+++ b/browser/components/extensions/test/xpcshell/head.js
@@ -1,14 +1,15 @@
 "use strict";
 
 const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
 
 /* exported createHttpServer, promiseConsoleOutput  */
 
+Components.utils.import("resource://gre/modules/Services.jsm");
 Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
 
 XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
                                   "resource://gre/modules/AppConstants.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Extension",
                                   "resource://gre/modules/Extension.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "ExtensionData",
                                   "resource://gre/modules/Extension.jsm");
@@ -17,21 +18,21 @@ XPCOMUtils.defineLazyModuleGetter(this, 
 XPCOMUtils.defineLazyModuleGetter(this, "FileUtils",
                                   "resource://gre/modules/FileUtils.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "HttpServer",
                                   "resource://testing-common/httpd.js");
 XPCOMUtils.defineLazyModuleGetter(this, "NetUtil",
                                   "resource://gre/modules/NetUtil.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "Schemas",
                                   "resource://gre/modules/Schemas.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "Services",
-                                  "resource://gre/modules/Services.jsm");
 XPCOMUtils.defineLazyModuleGetter(this, "TestUtils",
                                   "resource://testing-common/TestUtils.jsm");
 
+Services.prefs.setBoolPref("extensions.webextensions.remote", false);
+
 ExtensionTestUtils.init(this);
 
 
 /**
  * Creates a new HttpServer for testing, and begins listening on the
  * specified port. Automatically shuts down the server when the test
  * unit ends.
  *
copy from toolkit/components/extensions/test/xpcshell/head_remote.js
copy to browser/components/extensions/test/xpcshell/head_remote.js
copy from browser/components/extensions/test/xpcshell/xpcshell.ini
copy to browser/components/extensions/test/xpcshell/xpcshell-common.ini
--- a/browser/components/extensions/test/xpcshell/xpcshell.ini
+++ b/browser/components/extensions/test/xpcshell/xpcshell-common.ini
@@ -1,17 +1,8 @@
-[DEFAULT]
-head = head.js
-firefox-appdir = browser
-tags = webextensions
-
 [test_ext_bookmarks.js]
 [test_ext_browsingData.js]
 [test_ext_browsingData_cookies_cache.js]
 [test_ext_browsingData_downloads.js]
 [test_ext_browsingData_passwords.js]
 [test_ext_browsingData_settings.js]
 [test_ext_history.js]
-[test_ext_manifest_commands.js]
-[test_ext_manifest_omnibox.js]
-[test_ext_manifest_permissions.js]
 [test_ext_geckoProfiler_control.js]
-[test_ext_geckoProfiler_schema.js]
copy from browser/components/extensions/test/xpcshell/xpcshell.ini
copy to browser/components/extensions/test/xpcshell/xpcshell-remote.ini
--- a/browser/components/extensions/test/xpcshell/xpcshell.ini
+++ b/browser/components/extensions/test/xpcshell/xpcshell-remote.ini
@@ -1,17 +1,7 @@
 [DEFAULT]
-head = head.js
+head = head.js head_remote.js
 firefox-appdir = browser
-tags = webextensions
+tags = webextensions remote-webextensions
+dupe-manifest =
 
-[test_ext_bookmarks.js]
-[test_ext_browsingData.js]
-[test_ext_browsingData_cookies_cache.js]
-[test_ext_browsingData_downloads.js]
-[test_ext_browsingData_passwords.js]
-[test_ext_browsingData_settings.js]
-[test_ext_history.js]
-[test_ext_manifest_commands.js]
-[test_ext_manifest_omnibox.js]
-[test_ext_manifest_permissions.js]
-[test_ext_geckoProfiler_control.js]
-[test_ext_geckoProfiler_schema.js]
+[include:xpcshell-common.ini]
--- a/browser/components/extensions/test/xpcshell/xpcshell.ini
+++ b/browser/components/extensions/test/xpcshell/xpcshell.ini
@@ -1,17 +1,24 @@
 [DEFAULT]
 head = head.js
 firefox-appdir = browser
-tags = webextensions
+tags = webextensions in-process-webextensions
+dupe-manifest =
 
-[test_ext_bookmarks.js]
-[test_ext_browsingData.js]
-[test_ext_browsingData_cookies_cache.js]
-[test_ext_browsingData_downloads.js]
-[test_ext_browsingData_passwords.js]
-[test_ext_browsingData_settings.js]
-[test_ext_history.js]
+# This file contains tests which are not affected by multi-process
+# configuration, or do not support out-of-process content or extensions
+# for one reason or another.
+#
+# Tests which are affected by remote content or remote extensions should
+# go in one of:
+#
+#  - xpcshell-common.ini
+#    For tests which should run in all configurations.
+#  - xpcshell-remote.ini
+#    For tests which should only run with both remote extensions and remote content.
+
 [test_ext_manifest_commands.js]
 [test_ext_manifest_omnibox.js]
 [test_ext_manifest_permissions.js]
-[test_ext_geckoProfiler_control.js]
 [test_ext_geckoProfiler_schema.js]
+
+[include:xpcshell-common.ini]