Bug 1357490: Part 2: Run browser xpcshell tests in both in-process and OOP modes. r?aswan
MozReview-Commit-ID: 1ogotK4j3cy
--- 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]