Bug 1357490: Part 2: Run browser xpcshell tests in both in-process and OOP modes. r?aswan draft
authorKris Maglione <maglione.k@gmail.com>
Tue, 18 Apr 2017 11:33:56 -0700
changeset 581476 099c7825e08689c910dc5f0e03db633c44b01022
parent 581475 05fb233ac80a170d53888fe473a3135c22f95f13
child 629598 73eba9d9a3d4993205f24793aaaa632b87beefa5
push id59891
push usermaglione.k@gmail.com
push dateFri, 19 May 2017 22:42:17 +0000
reviewersaswan
bugs1357490
milestone55.0a1
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");
@@ -19,21 +20,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,16 +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]
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,16 +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]
+[include:xpcshell-common.ini]
--- a/browser/components/extensions/test/xpcshell/xpcshell.ini
+++ b/browser/components/extensions/test/xpcshell/xpcshell.ini
@@ -1,16 +1,11 @@
 [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]
 [test_ext_manifest_commands.js]
 [test_ext_manifest_omnibox.js]
 [test_ext_manifest_permissions.js]
-[test_ext_geckoProfiler_control.js]
+
+[include:xpcshell-common.ini]