bug 844655: Port XPCSHELL_TESTS to moz.build as XPCSHELL_TESTS_MANIFESTS
authorJoey Armstrong <joey@mozilla.com>
Mon, 29 Apr 2013 14:49:00 -0400
changeset 137040 04d7289c00a0ddee9d67ae2c1cfb0deec95d9630
parent 137039 e49215d92524da32c497549cfbe15cbbe1942376
child 137041 db6188d1abe69a2accba25fd1bb72e755a46cb0a
push idunknown
push userunknown
push dateunknown
bugs844655
milestone23.0a1
bug 844655: Port XPCSHELL_TESTS to moz.build as XPCSHELL_TESTS_MANIFESTS
addon-sdk/test/Makefile.in
addon-sdk/test/moz.build
b2g/components/test/Makefile.in
b2g/components/test/moz.build
browser/components/dirprovider/tests/Makefile.in
browser/components/dirprovider/tests/moz.build
browser/components/downloads/test/Makefile.in
browser/components/downloads/test/moz.build
browser/components/feeds/test/Makefile.in
browser/components/feeds/test/moz.build
browser/components/migration/tests/Makefile.in
browser/components/migration/tests/moz.build
browser/components/places/tests/Makefile.in
browser/components/places/tests/moz.build
browser/components/sessionstore/test/Makefile.in
browser/components/sessionstore/test/moz.build
browser/components/shell/test/Makefile.in
browser/components/shell/test/moz.build
browser/devtools/shared/test/Makefile.in
browser/devtools/shared/test/moz.build
browser/metro/base/tests/Makefile.in
browser/metro/base/tests/moz.build
chrome/test/Makefile.in
chrome/test/moz.build
content/base/test/Makefile.in
content/base/test/moz.build
content/test/Makefile.in
content/test/moz.build
docshell/test/Makefile.in
docshell/test/moz.build
dom/activities/tests/Makefile.in
dom/activities/tests/moz.build
dom/apps/tests/Makefile.in
dom/apps/tests/moz.build
dom/encoding/test/Makefile.in
dom/encoding/test/moz.build
dom/indexedDB/ipc/Makefile.in
dom/indexedDB/ipc/moz.build
dom/indexedDB/test/Makefile.in
dom/indexedDB/test/moz.build
dom/mms/Makefile.in
dom/mms/moz.build
dom/mobilemessage/Makefile.in
dom/mobilemessage/moz.build
dom/network/tests/Makefile.in
dom/network/tests/moz.build
dom/payment/tests/Makefile.in
dom/payment/tests/moz.build
dom/permission/tests/Makefile.in
dom/permission/tests/moz.build
dom/plugins/test/Makefile.in
dom/plugins/test/moz.build
dom/src/json/test/Makefile.in
dom/src/json/test/moz.build
dom/system/gonk/Makefile.in
dom/system/gonk/moz.build
dom/tests/Makefile.in
dom/tests/moz.build
embedding/Makefile.in
embedding/moz.build
extensions/cookie/test/Makefile.in
extensions/cookie/test/moz.build
extensions/spellcheck/hunspell/Makefile.in
extensions/spellcheck/hunspell/moz.build
gfx/tests/Makefile.in
gfx/tests/moz.build
image/test/Makefile.in
image/test/moz.build
intl/locale/tests/Makefile.in
intl/locale/tests/moz.build
intl/strres/tests/Makefile.in
intl/strres/tests/moz.build
intl/uconv/tests/Makefile.in
intl/uconv/tests/moz.build
intl/unicharutil/tests/Makefile.in
intl/unicharutil/tests/moz.build
ipc/testshell/Makefile.in
ipc/testshell/moz.build
js/ductwork/debugger/Makefile.in
js/ductwork/debugger/moz.build
js/ipc/tests/Makefile.in
js/ipc/tests/moz.build
js/jsd/Makefile.in
js/jsd/moz.build
js/xpconnect/tests/Makefile.in
js/xpconnect/tests/moz.build
layout/tools/layout-debug/tests/Makefile.in
layout/tools/layout-debug/tests/moz.build
modules/libjar/test/Makefile.in
modules/libjar/test/moz.build
modules/libjar/zipwriter/test/Makefile.in
modules/libjar/zipwriter/test/moz.build
modules/libmar/tests/Makefile.in
modules/libmar/tests/moz.build
modules/libpref/test/Makefile.in
modules/libpref/test/moz.build
netwerk/cookie/Makefile.in
netwerk/cookie/moz.build
netwerk/test/Makefile.in
netwerk/test/httpserver/Makefile.in
netwerk/test/httpserver/moz.build
netwerk/test/moz.build
parser/xml/test/Makefile.in
parser/xml/test/moz.build
rdf/tests/Makefile.in
rdf/tests/moz.build
security/manager/ssl/tests/Makefile.in
security/manager/ssl/tests/moz.build
services/common/tests/Makefile.in
services/common/tests/moz.build
services/crypto/component/tests/Makefile.in
services/crypto/component/tests/moz.build
services/crypto/tests/Makefile.in
services/crypto/tests/moz.build
services/datareporting/tests/Makefile.in
services/datareporting/tests/moz.build
services/healthreport/tests/Makefile.in
services/healthreport/tests/moz.build
services/metrics/tests/Makefile.in
services/metrics/tests/moz.build
services/sync/tests/Makefile.in
services/sync/tests/moz.build
storage/test/Makefile.in
storage/test/moz.build
testing/xpcshell/example/Makefile.in
testing/xpcshell/example/moz.build
toolkit/components/autocomplete/tests/Makefile.in
toolkit/components/autocomplete/tests/moz.build
toolkit/components/captivedetect/test/Makefile.in
toolkit/components/captivedetect/test/moz.build
toolkit/components/commandlines/test/Makefile.in
toolkit/components/commandlines/test/moz.build
toolkit/components/contentprefs/tests/Makefile.in
toolkit/components/contentprefs/tests/moz.build
toolkit/components/ctypes/tests/Makefile.in
toolkit/components/ctypes/tests/moz.build
toolkit/components/downloads/test/Makefile.in
toolkit/components/downloads/test/moz.build
toolkit/components/jsdownloads/test/Makefile.in
toolkit/components/jsdownloads/test/moz.build
toolkit/components/mediasniffer/test/Makefile.in
toolkit/components/mediasniffer/test/moz.build
toolkit/components/osfile/tests/Makefile.in
toolkit/components/osfile/tests/moz.build
toolkit/components/passwordmgr/test/Makefile.in
toolkit/components/passwordmgr/test/moz.build
toolkit/components/places/tests/Makefile.in
toolkit/components/places/tests/moz.build
toolkit/components/satchel/test/Makefile.in
toolkit/components/satchel/test/moz.build
toolkit/components/search/tests/Makefile.in
toolkit/components/search/tests/moz.build
toolkit/components/social/test/Makefile.in
toolkit/components/social/test/moz.build
toolkit/components/startup/Makefile.in
toolkit/components/startup/moz.build
toolkit/components/telemetry/tests/Makefile.in
toolkit/components/telemetry/tests/moz.build
toolkit/components/url-classifier/tests/Makefile.in
toolkit/components/url-classifier/tests/moz.build
toolkit/components/urlformatter/tests/Makefile.in
toolkit/components/urlformatter/tests/moz.build
toolkit/content/tests/Makefile.in
toolkit/content/tests/moz.build
toolkit/crashreporter/client/Makefile.in
toolkit/crashreporter/client/moz.build
toolkit/crashreporter/test/Makefile.in
toolkit/crashreporter/test/moz.build
toolkit/devtools/debugger/tests/Makefile.in
toolkit/devtools/debugger/tests/moz.build
toolkit/devtools/sourcemap/tests/Makefile.in
toolkit/devtools/sourcemap/tests/moz.build
toolkit/forgetaboutsite/test/Makefile.in
toolkit/forgetaboutsite/test/moz.build
toolkit/identity/tests/Makefile.in
toolkit/identity/tests/moz.build
toolkit/modules/tests/Makefile.in
toolkit/modules/tests/moz.build
toolkit/mozapps/downloads/tests/Makefile.in
toolkit/mozapps/downloads/tests/moz.build
toolkit/mozapps/extensions/test/Makefile.in
toolkit/mozapps/extensions/test/moz.build
toolkit/mozapps/shared/Makefile.in
toolkit/mozapps/shared/moz.build
toolkit/mozapps/update/test/Makefile.in
toolkit/mozapps/update/test/moz.build
toolkit/mozapps/update/test_svc/Makefile.in
toolkit/mozapps/update/test_svc/moz.build
toolkit/mozapps/update/test_timermanager/Makefile.in
toolkit/mozapps/update/test_timermanager/moz.build
tools/profiler/Makefile.in
tools/profiler/moz.build
uriloader/exthandler/tests/Makefile.in
uriloader/exthandler/tests/moz.build
widget/tests/Makefile.in
widget/tests/moz.build
xpcom/tests/Makefile.in
xpcom/tests/moz.build
--- a/addon-sdk/test/Makefile.in
+++ b/addon-sdk/test/Makefile.in
@@ -3,12 +3,12 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DEPTH            = @DEPTH@
 topsrcdir        = @top_srcdir@
 srcdir           = @srcdir@
 VPATH            = @srcdir@
 relativesrcdir   = @relativesrcdir@
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
--- a/addon-sdk/test/moz.build
+++ b/addon-sdk/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_addon_sdk'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/b2g/components/test/Makefile.in
+++ b/b2g/components/test/Makefile.in
@@ -8,11 +8,11 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 FAIL_ON_WARNINGS := 1
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/b2g/components/test/moz.build
+++ b/b2g/components/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'B2GComponents'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/components/dirprovider/tests/Makefile.in
+++ b/browser/components/dirprovider/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/dirprovider/tests/moz.build
+++ b/browser/components/dirprovider/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_browserdir'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/components/downloads/test/Makefile.in
+++ b/browser/components/downloads/test/Makefile.in
@@ -5,11 +5,11 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/downloads/test/moz.build
+++ b/browser/components/downloads/test/moz.build
@@ -1,7 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['browser']
+
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/components/feeds/test/Makefile.in
+++ b/browser/components/feeds/test/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS	= unit
+DISABLED_XPCSHELL_TESTS	= unit
 
 MOCHITEST_FILES =	bug408328-data.xml \
 		bug368464-data.xml \
 		test_bug494328.html \
 		bug494328-data.xml \
 		test_bug589543.html \
 		bug589543-data.xml \
 		test_bug436801.html \
--- a/browser/components/feeds/test/moz.build
+++ b/browser/components/feeds/test/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['chrome']
 
 MODULE = 'test_browser_feeds'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/components/migration/tests/Makefile.in
+++ b/browser/components/migration/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH		  = @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		  = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/migration/tests/moz.build
+++ b/browser/components/migration/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/components/places/tests/Makefile.in
+++ b/browser/components/places/tests/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/places/tests/moz.build
+++ b/browser/components/places/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['browser', 'chrome']
 
 MODULE = 'test_browser_places'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/components/sessionstore/test/Makefile.in
+++ b/browser/components/sessionstore/test/Makefile.in
@@ -10,17 +10,17 @@ relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # browser_506482.js is disabled because of frequent failures (bug 538672)
 # browser_526613.js is disabled because of frequent failures (bug 534489)
 # browser_589246.js is disabled for leaking browser windows (bug 752467)
 # browser_580512.js is disabled for leaking browser windows (bug 752467)
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
 	unit \
 	$(NULL)
 
 MOCHITEST_BROWSER_FILES = \
 	head.js \
 	browser_capabilities.js \
 	browser_form_restore_events.js \
 	browser_form_restore_events_sample.html \
--- a/browser/components/sessionstore/test/moz.build
+++ b/browser/components/sessionstore/test/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/components/shell/test/Makefile.in
+++ b/browser/components/shell/test/Makefile.in
@@ -5,16 +5,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS	= unit
+DISABLED_XPCSHELL_TESTS	= unit
 
 
 MOCHITEST_BROWSER_FILES = browser_420786.js \
     browser_633221.js \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/browser/components/shell/test/moz.build
+++ b/browser/components/shell/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_browser_shell'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/devtools/shared/test/Makefile.in
+++ b/browser/devtools/shared/test/Makefile.in
@@ -6,17 +6,17 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 MOCHITEST_BROWSER_FILES = \
   browser_browser_basic.js \
   browser_require_basic.js \
   browser_templater_basic.js \
   browser_toolbar_basic.js \
   browser_toolbar_tooltip.js \
   browser_toolbar_webconsole_errors_count.js \
--- a/browser/devtools/shared/test/moz.build
+++ b/browser/devtools/shared/test/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/browser/metro/base/tests/Makefile.in
+++ b/browser/metro/base/tests/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 # For now we're copying the actual Util code.
 # We should make this into a jsm module. See bug 848137
 XPCSHELL_RESOURCES = \
   $(DEPTH)/browser/metro/base/content/Util.js \
   $(NULL)
 
 libs:: $(XPCSHELL_RESOURCES)
--- a/browser/metro/base/tests/moz.build
+++ b/browser/metro/base/tests/moz.build
@@ -1,7 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['mochitest']
+
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/chrome/test/Makefile.in
+++ b/chrome/test/Makefile.in
@@ -5,16 +5,16 @@
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 relativesrcdir = @relativesrcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit \
+DISABLED_XPCSHELL_TESTS = unit \
                  $(NULL)
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/chrome/test/moz.build
+++ b/chrome/test/moz.build
@@ -1,8 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_chrome'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/content/base/test/Makefile.in
+++ b/content/base/test/Makefile.in
@@ -13,22 +13,22 @@ include $(DEPTH)/config/autoconf.mk
 
 CPP_UNIT_TESTS = \
                  TestNativeXMLHttpRequest.cpp \
                  TestGetURL.cpp \
                  TestPlainTextSerializer.cpp \
                  $(NULL)
 
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
                unit \
                $(NULL)
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 
 # Split files arbitrarily in three groups to not run into too-long command lines
 # which break on Windows (see bug 563151 and bug 831989)
 MOCHITEST_FILES_A = \
 		responseIdentical.sjs \
 		test_bug5141.html \
--- a/content/base/test/moz.build
+++ b/content/base/test/moz.build
@@ -3,8 +3,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['chrome', 'websocket_hybi']
 
 MODULE = 'content'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/content/test/Makefile.in
+++ b/content/test/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/content/test/moz.build
+++ b/content/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_content'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/docshell/test/Makefile.in
+++ b/docshell/test/Makefile.in
@@ -6,20 +6,20 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 MOCHITEST_FILES = \
 		test_bug123696.html \
 		bug123696-subframe.html \
 		test_bug369814.html \
 		bug369814.zip \
 		bug369814.jar \
--- a/docshell/test/moz.build
+++ b/docshell/test/moz.build
@@ -3,8 +3,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['chrome', 'navigation', 'browser']
 
 MODULE = 'test_docshell'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/dom/activities/tests/Makefile.in
+++ b/dom/activities/tests/Makefile.in
@@ -7,11 +7,11 @@ topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 FAIL_ON_WARNINGS := 1
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/activities/tests/moz.build
+++ b/dom/activities/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/apps/tests/Makefile.in
+++ b/dom/apps/tests/Makefile.in
@@ -19,11 +19,11 @@ MOCHITEST_FILES = \
   file_cached_app.template.webapp \
   file_cached_app.template.appcache \
   $(NULL)
 
 MOCHITEST_CHROME_FILES = \
   test_apps_service.xul \
   $(NULL)
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/apps/tests/moz.build
+++ b/dom/apps/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/encoding/test/Makefile.in
+++ b/dom/encoding/test/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 MOCHITEST_FILES = \
   file_utf16_be_bom.css \
   file_utf16_be_bom.js \
   file_utf16_be_bom.xhtml \
   file_utf16_le_bom.css \
   file_utf16_le_bom.js \
   file_utf16_le_bom.xhtml \
--- a/dom/encoding/test/moz.build
+++ b/dom/encoding/test/moz.build
@@ -1,7 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['unit']
+
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/indexedDB/ipc/Makefile.in
+++ b/dom/indexedDB/ipc/Makefile.in
@@ -25,23 +25,25 @@ LOCAL_INCLUDES += \
   -I$(topsrcdir)/content/events/src \
   $(NULL)
 
 DEFINES += -D_IMPL_NS_LAYOUT
 
 MOCHITEST_FILES = test_ipc.html
 
 # Need to enable these tests sometime soon.
-#XPCSHELL_TESTS = unit
+#DISABLED_XPCSHELL_TESTS = unit
 
 # We're copying tests from another directory so this check is wrong for us.
 #NO_XPCSHELL_MANIFEST_CHECK = 1
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
+xpcshell_tests = unit
+
 # Copy all the normal xpcshell tests from the regular unit directory.
 copy-xpcshell-tests:
 	$(call install_cmd,$(wildcard $(topsrcdir)/dom/indexedDB/test/unit/test_*.js) \
-		$(testxpcobjdir)/$(relativesrcdir)/$(XPCSHELL_TESTS))
+		$(testxpcobjdir)/$(relativesrcdir)/$(xpcshell_tests))
 
 libs-xpcshell-tests: copy-xpcshell-tests
--- a/dom/indexedDB/ipc/moz.build
+++ b/dom/indexedDB/ipc/moz.build
@@ -5,8 +5,10 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'dom'
 
 EXPORTS.mozilla.dom.indexedDB += [
     'SerializationHelpers.h',
 ]
 
+# Need to enable these tests sometime soon.
+#XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/indexedDB/test/Makefile.in
+++ b/dom/indexedDB/test/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 MOCHITEST_FILES = \
   bfcache_iframe1.html \
   bfcache_iframe2.html \
   error_events_abort_transactions_iframe.html \
   event_propagation_iframe.html \
   exceptions_in_events_iframe.html \
   file.js \
--- a/dom/indexedDB/test/moz.build
+++ b/dom/indexedDB/test/moz.build
@@ -1,7 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['unit']
+
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/mms/Makefile.in
+++ b/dom/mms/Makefile.in
@@ -8,13 +8,13 @@ srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 relativesrcdir   = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_B2G_RIL
 ifdef ENABLE_TESTS
-XPCSHELL_TESTS = tests
+DISABLED_XPCSHELL_TESTS = tests
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/mms/moz.build
+++ b/dom/mms/moz.build
@@ -1,7 +1,10 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 PARALLEL_DIRS += ['interfaces', 'src']
+
+if CONFIG['MOZ_B2G_RIL'] and CONFIG['ENABLE_TESTS']:
+    XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
--- a/dom/mobilemessage/Makefile.in
+++ b/dom/mobilemessage/Makefile.in
@@ -7,12 +7,12 @@ topsrcdir        = @top_srcdir@
 srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 relativesrcdir   = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef ENABLE_TESTS
-XPCSHELL_TESTS = tests
+DISABLED_XPCSHELL_TESTS = tests
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/mobilemessage/moz.build
+++ b/dom/mobilemessage/moz.build
@@ -1,8 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['interfaces', 'src']
 TEST_DIRS += ['tests']
+
+if CONFIG['ENABLE_TESTS']:
+    XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
--- a/dom/network/tests/Makefile.in
+++ b/dom/network/tests/Makefile.in
@@ -22,15 +22,15 @@ ifdef MOZ_B2G_RIL
 MOCHITEST_FILES = \
   test_networkstats_basics.html \
   test_networkstats_disabled.html \
   test_networkstats_enabled_no_perm.html \
   test_networkstats_enabled_perm.html \
   $(NULL)
 endif
 
-XPCSHELL_TESTS = unit unit_ipc
+DISABLED_XPCSHELL_TESTS = unit unit_ipc
 
 ifdef MOZ_B2G_RIL
-XPCSHELL_TESTS += unit_stats
+DISABLED_XPCSHELL_TESTS += unit_stats
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/network/tests/moz.build
+++ b/dom/network/tests/moz.build
@@ -1,8 +1,12 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_dom_socket'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini', 'unit_ipc/xpcshell.ini']
+
+if CONFIG['MOZ_B2G_RIL']:
+    XPCSHELL_TESTS_MANIFESTS += ['unit_stats/xpcshell.ini']
--- a/dom/payment/tests/Makefile.in
+++ b/dom/payment/tests/Makefile.in
@@ -6,11 +6,11 @@ DEPTH            = @DEPTH@
 topsrcdir        = @top_srcdir@
 srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 relativesrcdir   = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/payment/tests/moz.build
+++ b/dom/payment/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_dom_payment'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/permission/tests/Makefile.in
+++ b/dom/permission/tests/Makefile.in
@@ -6,17 +6,17 @@ DEPTH            = ../../..
 topsrcdir        = @top_srcdir@
 srcdir           = @srcdir@
 VPATH            = @srcdir@
 
 relativesrcdir   = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
   test_permission_basics.html \
   $(NULL)
 
 _CHROME_TEST_FILES = \
--- a/dom/permission/tests/moz.build
+++ b/dom/permission/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_permission'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/plugins/test/Makefile.in
+++ b/dom/plugins/test/Makefile.in
@@ -6,13 +6,13 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/plugins/test/moz.build
+++ b/dom/plugins/test/moz.build
@@ -6,8 +6,9 @@
 
 DIRS += ['testplugin']
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'cocoa', 'windows'):
     TEST_DIRS += ['mochitest']
 
 MODULE = 'test_plugin'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/src/json/test/Makefile.in
+++ b/dom/src/json/test/Makefile.in
@@ -6,15 +6,15 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
  MOCHITEST_FILES =	test_json.html \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/dom/src/json/test/moz.build
+++ b/dom/src/json/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'json_test'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/dom/system/gonk/Makefile.in
+++ b/dom/system/gonk/Makefile.in
@@ -72,14 +72,14 @@ EXTRA_COMPONENTS = \
 EXTRA_JS_MODULES = \
   net_worker.js \
   ril_consts.js \
   ril_worker.js \
   systemlibs.js \
   $(NULL)
 
 ifdef ENABLE_TESTS
-XPCSHELL_TESTS = tests
+DISABLED_XPCSHELL_TESTS = tests
 endif
 
 include $(topsrcdir)/config/rules.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 
--- a/dom/system/gonk/moz.build
+++ b/dom/system/gonk/moz.build
@@ -35,8 +35,11 @@ XPIDL_FLAGS += [
 
 MODULE = 'dom'
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     EXPORTS += [
         'GonkGPSGeolocationProvider.h',
         'nsVolume.h',
     ]
+
+if CONFIG['ENABLE_TESTS']:
+    XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
--- a/dom/tests/Makefile.in
+++ b/dom/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/dom/tests/moz.build
+++ b/dom/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['mochitest', 'browser']
 
 MODULE = 'test_dom'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/embedding/Makefile.in
+++ b/embedding/Makefile.in
@@ -7,12 +7,12 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef ENABLE_TESTS
-XPCSHELL_TESTS = tests/unit
+DISABLED_XPCSHELL_TESTS = tests/unit
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/embedding/moz.build
+++ b/embedding/moz.build
@@ -4,8 +4,10 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['base', 'components', 'browser']
 TEST_DIRS += ['test']
 
 MODULE = 'embed'
 
+if CONFIG['ENABLE_TESTS']:
+    XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
--- a/extensions/cookie/test/Makefile.in
+++ b/extensions/cookie/test/Makefile.in
@@ -56,17 +56,17 @@ MOCHITEST_CHROME_FILES = \
   test_app_uninstall_cookies.html \
   channel_utils.js \
   $(NULL)
 
 MOCHITEST_BROWSER_FILES = \
   browser_test_favicon.js \
   $(NULL)
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/extensions/cookie/test/moz.build
+++ b/extensions/cookie/test/moz.build
@@ -1,8 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_cookies'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/extensions/spellcheck/hunspell/Makefile.in
+++ b/extensions/spellcheck/hunspell/Makefile.in
@@ -6,13 +6,13 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef ENABLE_TESTS
-XPCSHELL_TESTS = tests/unit
+DISABLED_XPCSHELL_TESTS = tests/unit
 endif
 
 include $(topsrcdir)/config/rules.mk
 
--- a/extensions/spellcheck/hunspell/moz.build
+++ b/extensions/spellcheck/hunspell/moz.build
@@ -3,8 +3,10 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['src']
 
 MODULE = 'hunspell'
 
+if CONFIG['ENABLE_TESTS']:
+    XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
--- a/gfx/tests/Makefile.in
+++ b/gfx/tests/Makefile.in
@@ -8,17 +8,17 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MOZILLA_INTERNAL_API = 1
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 MOCHITEST_FILES = $(addprefix mochitest/, \
 	test_bug509244.html \
 	test_bug513439.html \
 	test_acceleration.html \
 )
 
 # CPP_UNIT_TESTS disabled for now because they dont work in libxul builds.
--- a/gfx/tests/moz.build
+++ b/gfx/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'gfx'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/image/test/Makefile.in
+++ b/image/test/Makefile.in
@@ -6,11 +6,11 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # Module name for xpcshell tests.
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/image/test/moz.build
+++ b/image/test/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['mochitest', 'browser']
 
 MODULE = 'test_libpr0n'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/intl/locale/tests/Makefile.in
+++ b/intl/locale/tests/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/intl/locale/tests/moz.build
+++ b/intl/locale/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_intl_locale'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/intl/strres/tests/Makefile.in
+++ b/intl/strres/tests/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS	 = unit
+DISABLED_XPCSHELL_TESTS	 = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/intl/strres/tests/moz.build
+++ b/intl/strres/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_intl_strres'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/intl/uconv/tests/Makefile.in
+++ b/intl/uconv/tests/Makefile.in
@@ -6,17 +6,17 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS	= unit
+DISABLED_XPCSHELL_TESTS	= unit
 
 # Tests disabled because they dont work in libxul builds.
 #MOZILLA_INTERNAL_API = 1
 #
 #
 #CPPSRCS		= \
 #		TestUConv.cpp \
 #		nsconv.cpp \
--- a/intl/uconv/tests/moz.build
+++ b/intl/uconv/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_intl_uconv'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/intl/unicharutil/tests/Makefile.in
+++ b/intl/unicharutil/tests/Makefile.in
@@ -6,17 +6,17 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS	= unit
+DISABLED_XPCSHELL_TESTS	= unit
 
 USE_STATIC_LIBS = 1
 
 CPPSRCS		= UnicharSelfTest.cpp \
 		  NormalizationTest.cpp \
 		  $(NULL)
 
 SIMPLE_PROGRAMS	= $(CPPSRCS:.cpp=$(BIN_SUFFIX))
--- a/intl/unicharutil/tests/moz.build
+++ b/intl/unicharutil/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_intl_unicharutil'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/ipc/testshell/Makefile.in
+++ b/ipc/testshell/Makefile.in
@@ -25,14 +25,14 @@ CPPSRCS += \
 # For xpcshell error messages and nsDependentJSString
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/js/xpconnect/shell \
   -I$(topsrcdir)/dom/base \
   $(NULL)
 
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS = tests
+DISABLED_XPCSHELL_TESTS = tests
 endif
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
--- a/ipc/testshell/moz.build
+++ b/ipc/testshell/moz.build
@@ -7,8 +7,11 @@
 MODULE = 'ipcshell'
 
 EXPORTS.mozilla.ipc += [
     'TestShellChild.h',
     'TestShellParent.h',
     'XPCShellEnvironment.h',
 ]
 
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
--- a/js/ductwork/debugger/Makefile.in
+++ b/js/ductwork/debugger/Makefile.in
@@ -25,11 +25,11 @@ EXTRA_DSO_LDOPTS += \
   $(MOZ_COMPONENT_LIBS) \
   $(MOZ_JS_LIBS) \
   $(NULL)
 
 EXTRA_JS_MODULES = \
   jsdebugger.jsm \
   $(NULL)
 
-XPCSHELL_TESTS = tests
+DISABLED_XPCSHELL_TESTS = tests
 
 include $(topsrcdir)/config/rules.mk
--- a/js/ductwork/debugger/moz.build
+++ b/js/ductwork/debugger/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
     'IJSDebugger.idl',
 ]
 
 MODULE = 'jsdebugger'
 
+XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
--- a/js/ipc/tests/Makefile.in
+++ b/js/ipc/tests/Makefile.in
@@ -6,13 +6,13 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 endif
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
--- a/js/ipc/tests/moz.build
+++ b/js/ipc/tests/moz.build
@@ -1,8 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_jsipc'
 
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/js/jsd/Makefile.in
+++ b/js/jsd/Makefile.in
@@ -19,17 +19,17 @@ CPPSRCS	 = \
 		jsd_xpc.cpp \
 		jshash.cpp
 IS_COMPONENT = 1
 LIBXUL_LIBRARY = 1
 
 MODULE_NAME = JavaScript_Debugger
 EXPORT_LIBRARY = 1
 
-XPCSHELL_TESTS  = test
+DISABLED_XPCSHELL_TESTS  = test
 
 # REQUIRES	= java js
 
 ifdef JS_THREADSAFE
 DEFINES         += -DJS_THREADSAFE
 endif
 
 CPPSRCS		+= \
--- a/js/jsd/moz.build
+++ b/js/jsd/moz.build
@@ -8,8 +8,9 @@ DIRS += ['idl']
 TEST_TOOL_DIRS += ['test']
 
 MODULE = 'jsdebug'
 
 EXPORTS += [
     'jsdebug.h',
 ]
 
+XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
--- a/js/xpconnect/tests/Makefile.in
+++ b/js/xpconnect/tests/Makefile.in
@@ -6,17 +6,17 @@
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 LIBS = \
   $(DIST)/lib/$(LIB_PREFIX)xpcomglue_s.$(LIB_SUFFIX) \
   $(LIBS_DIR) \
   $(MOZ_JS_LIBS) \
   $(MOZ_COMPONENT_LIBS) \
   $(NULL)
 
--- a/js/xpconnect/tests/moz.build
+++ b/js/xpconnect/tests/moz.build
@@ -7,8 +7,10 @@
 DIRS += [
     'idl',
     'mochitest',
     'chrome',
     'browser',
     'components/native',
     'components/js',
 ]
+
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/layout/tools/layout-debug/tests/Makefile.in
+++ b/layout/tools/layout-debug/tests/Makefile.in
@@ -7,11 +7,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/layout/tools/layout-debug/tests/moz.build
+++ b/layout/tools/layout-debug/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/modules/libjar/test/Makefile.in
+++ b/modules/libjar/test/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libjar/test/moz.build
+++ b/modules/libjar/test/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['mochitest', 'chrome']
 
 MODULE = 'test_libjar'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/modules/libjar/zipwriter/test/Makefile.in
+++ b/modules/libjar/zipwriter/test/Makefile.in
@@ -5,13 +5,13 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libjar/zipwriter/test/moz.build
+++ b/modules/libjar/zipwriter/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_zipwriter'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/modules/libmar/tests/Makefile.in
+++ b/modules/libmar/tests/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   $(NULL)
 
 TESTROOT = $(call core_abspath,$(DEPTH))/_tests/xpcshell/$(relativesrcdir)
 
 DEFINES += -DBIN_SUFFIX=$(BIN_SUFFIX)
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libmar/tests/moz.build
+++ b/modules/libmar/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/modules/libpref/test/Makefile.in
+++ b/modules/libpref/test/Makefile.in
@@ -6,16 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/modules/libpref/test/moz.build
+++ b/modules/libpref/test/moz.build
@@ -1,8 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_libpref'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/netwerk/cookie/Makefile.in
+++ b/netwerk/cookie/Makefile.in
@@ -18,30 +18,30 @@ ifdef NECKO_COOKIES
 LIBRARY_NAME     = neckocookie_s
 LIBXUL_LIBRARY   = 1
 FORCE_STATIC_LIB = 1
 CPPSRCS = \
   nsCookie.cpp \
   nsCookieService.cpp \
   $(NULL)
 
-XPCSHELL_TESTS += test/unit
+DISABLED_XPCSHELL_TESTS += test/unit
 
 CPPSRCS += \
 		CookieServiceParent.cpp \
 		CookieServiceChild.cpp \
 		$(NULL)
 
 LOCAL_INCLUDES	= \
 		-I$(topsrcdir)/intl/uconv/src \
 		$(NULL)
 
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += test/unit_ipc
+DISABLED_XPCSHELL_TESTS += test/unit_ipc
 endif
 endif
 
 
 include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/ipc/chromium/chromium-config.mk
 include $(topsrcdir)/config/rules.mk
 
--- a/netwerk/cookie/moz.build
+++ b/netwerk/cookie/moz.build
@@ -17,8 +17,15 @@ XPIDL_MODULE = 'necko_cookie'
 
 MODULE = 'necko'
 
 if CONFIG['NECKO_COOKIES']:
     EXPORTS.mozilla.net = [
         'CookieServiceParent.h',
         'CookieServiceChild.h',
     ]
+
+if CONFIG['NECKO_COOKIES']:
+    XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['NECKO_COOKIES'] and CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['test/unit_ipc/xpcshell.ini']
--- a/netwerk/test/Makefile.in
+++ b/netwerk/test/Makefile.in
@@ -55,20 +55,20 @@ include $(topsrcdir)/config/config.mk
 
 LIBS		= $(EXTRA_DSO_LIBS) \
 		  $(XPCOM_LIBS) \
 		  $(NSPR_LIBS) \
 		  $(NULL)
 
 DEFINES += $(TK_CFLAGS)
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 check::
 	$(RUN_TEST_PROGRAM) $(DIST)/bin/TestCookie$(BIN_SUFFIX)
 
 _RES_FILES 	= urlparse.dat \
--- a/netwerk/test/httpserver/Makefile.in
+++ b/netwerk/test/httpserver/Makefile.in
@@ -22,13 +22,13 @@ ifdef XPI_NAME
 NO_JS_MANIFEST = 1
 USE_EXTENSION_MANIFEST = 1
 else
 EXTRA_COMPONENTS += \
                    httpd.manifest \
                    $(NULL)
 endif
 
-XPCSHELL_TESTS = test
+DISABLED_XPCSHELL_TESTS = test
 
 TESTING_JS_MODULES = httpd.js
 
 include $(topsrcdir)/config/rules.mk
--- a/netwerk/test/httpserver/moz.build
+++ b/netwerk/test/httpserver/moz.build
@@ -5,8 +5,9 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 XPIDL_SOURCES += [
     'nsIHttpServer.idl',
 ]
 
 MODULE = 'test_necko'
 
+XPCSHELL_TESTS_MANIFESTS += ['test/xpcshell.ini']
--- a/netwerk/test/moz.build
+++ b/netwerk/test/moz.build
@@ -3,8 +3,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['httpserver', 'browser']
 
 MODULE = 'test_necko'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/parser/xml/test/Makefile.in
+++ b/parser/xml/test/Makefile.in
@@ -16,11 +16,11 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # Note: set the test module's name to test_<yourmodule>
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/parser/xml/test/moz.build
+++ b/parser/xml/test/moz.build
@@ -1,8 +1,10 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_xmlreader'
 
+# Note: set the test module's name to test_<yourmodule>
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/rdf/tests/Makefile.in
+++ b/rdf/tests/Makefile.in
@@ -6,12 +6,12 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
 
--- a/rdf/tests/moz.build
+++ b/rdf/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['rdfcat', 'rdfpoll', 'triplescat']
 
 MODULE = 'test_rdf'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/security/manager/ssl/tests/Makefile.in
+++ b/security/manager/ssl/tests/Makefile.in
@@ -3,11 +3,11 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/security/manager/ssl/tests/moz.build
+++ b/security/manager/ssl/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['mochitest']
 
 MODULE = 'pipnss'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/services/common/tests/Makefile.in
+++ b/services/common/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/services/common/tests/moz.build
+++ b/services/common/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_services_common'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/services/crypto/component/tests/Makefile.in
+++ b/services/crypto/component/tests/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/services/crypto/component/tests/moz.build
+++ b/services/crypto/component/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_services_crypto'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/services/crypto/tests/Makefile.in
+++ b/services/crypto/tests/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/services/crypto/tests/moz.build
+++ b/services/crypto/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_services_crypto'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/services/datareporting/tests/Makefile.in
+++ b/services/datareporting/tests/Makefile.in
@@ -5,12 +5,12 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = xpcshell
+DISABLED_XPCSHELL_TESTS = xpcshell
 
 include $(topsrcdir)/config/rules.mk
 
--- a/services/datareporting/tests/moz.build
+++ b/services/datareporting/tests/moz.build
@@ -1,5 +1,6 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini']
--- a/services/healthreport/tests/Makefile.in
+++ b/services/healthreport/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = xpcshell
+DISABLED_XPCSHELL_TESTS = xpcshell
 
 include $(topsrcdir)/config/rules.mk
--- a/services/healthreport/tests/moz.build
+++ b/services/healthreport/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini']
--- a/services/metrics/tests/Makefile.in
+++ b/services/metrics/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = xpcshell
+DISABLED_XPCSHELL_TESTS = xpcshell
 
 include $(topsrcdir)/config/rules.mk
--- a/services/metrics/tests/moz.build
+++ b/services/metrics/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini']
--- a/services/sync/tests/Makefile.in
+++ b/services/sync/tests/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/services/sync/tests/moz.build
+++ b/services/sync/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_services_sync'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/storage/test/Makefile.in
+++ b/storage/test/Makefile.in
@@ -6,17 +6,17 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 CPP_UNIT_TESTS = \
   test_transaction_helper.cpp \
   test_statement_scoper.cpp \
   test_mutex.cpp \
   test_binding_params.cpp \
   test_true_async.cpp \
   test_unlock_notify.cpp \
--- a/storage/test/moz.build
+++ b/storage/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_storage'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/testing/xpcshell/example/Makefile.in
+++ b/testing/xpcshell/example/Makefile.in
@@ -17,13 +17,13 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 # This is a list of directories containing tests to run, separated by spaces.
 # Most likely, tho, you won't use more than one directory here.
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
                  unit \
                  $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/testing/xpcshell/example/moz.build
+++ b/testing/xpcshell/example/moz.build
@@ -1,8 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_testing_xpcshell_example'
 
+# This is a list of directories containing tests to run, separated by spaces.
+# Most likely, tho, you won't use more than one directory here.
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/autocomplete/tests/Makefile.in
+++ b/toolkit/components/autocomplete/tests/Makefile.in
@@ -6,11 +6,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/autocomplete/tests/moz.build
+++ b/toolkit/components/autocomplete/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_autocomplete'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/captivedetect/test/Makefile.in
+++ b/toolkit/components/captivedetect/test/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/captivedetect/test/moz.build
+++ b/toolkit/components/captivedetect/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_captivedetect'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/commandlines/test/Makefile.in
+++ b/toolkit/components/commandlines/test/Makefile.in
@@ -6,21 +6,21 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
                  unit \
                  $(NULL)
 
 ifeq ($(OS_ARCH),WINNT)
-XPCSHELL_TESTS += unit_win
+DISABLED_XPCSHELL_TESTS += unit_win
 else
 ifneq (,$(filter-out OS2 Darwin,$(OS_ARCH)))
-XPCSHELL_TESTS += unit_unix
+DISABLED_XPCSHELL_TESTS += unit_unix
 endif
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/commandlines/test/moz.build
+++ b/toolkit/components/commandlines/test/moz.build
@@ -1,8 +1,15 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_harness_commandlines'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+if CONFIG['OS_ARCH'] == 'WINNT':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_win/xpcshell.ini']
+
+if CONFIG['OS_ARCH'] != 'WINNT' and CONFIG['OS_ARCH'] not in ('Darwin', 'OS2'):
+    XPCSHELL_TESTS_MANIFESTS += ['unit_unix/xpcshell.ini']
--- a/toolkit/components/contentprefs/tests/Makefile.in
+++ b/toolkit/components/contentprefs/tests/Makefile.in
@@ -6,16 +6,16 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit unit_cps2
+DISABLED_XPCSHELL_TESTS = unit unit_cps2
 
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/contentprefs/tests/moz.build
+++ b/toolkit/components/contentprefs/tests/moz.build
@@ -1,8 +1,13 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_toolkit_contentprefs'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini', 'unit_cps2/xpcshell.ini']
+
+# FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/toolkit/components/ctypes/tests/Makefile.in
+++ b/toolkit/components/ctypes/tests/Makefile.in
@@ -21,17 +21,17 @@ CPPSRCS = jsctypes-test.cpp \
           $(NULL)
 
 LOCAL_INCLUDES = \
     -I$(topsrcdir)/js/src/ctypes \
     $(NULL)
 
 EXTRA_DSO_LDOPTS += $(MOZALLOC_LIB)
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 # should be MOCHITEST_CHROME_FILES, see bug 770938
 MOCHITEST_CHROME_TESTS = \
   xpcshellTestHarnessAdaptor.js \
   ctypes_worker.js \
   test_ctypes.xul \
   $(NULL)
 
--- a/toolkit/components/ctypes/tests/moz.build
+++ b/toolkit/components/ctypes/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'jsctypes-test'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/downloads/test/Makefile.in
+++ b/toolkit/components/downloads/test/Makefile.in
@@ -6,15 +6,15 @@
 DEPTH   = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   schema_migration \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/components/downloads/test/moz.build
+++ b/toolkit/components/downloads/test/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['browser']
 
 MODULE = 'test_dm'
 
+XPCSHELL_TESTS_MANIFESTS += ['schema_migration/xpcshell.ini', 'unit/xpcshell.ini']
--- a/toolkit/components/jsdownloads/test/Makefile.in
+++ b/toolkit/components/jsdownloads/test/Makefile.in
@@ -5,11 +5,11 @@ DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/jsdownloads/test/moz.build
+++ b/toolkit/components/jsdownloads/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['data']
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/mediasniffer/test/Makefile.in
+++ b/toolkit/components/mediasniffer/test/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/mediasniffer/test/moz.build
+++ b/toolkit/components/mediasniffer/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_mediasniffer'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/osfile/tests/Makefile.in
+++ b/toolkit/components/osfile/tests/Makefile.in
@@ -3,12 +3,12 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DEPTH            = @DEPTH@
 topsrcdir        = @top_srcdir@
 srcdir           = @srcdir@
 VPATH            = @srcdir@
 relativesrcdir   = @relativesrcdir@
 
-XPCSHELL_TESTS = xpcshell
+DISABLED_XPCSHELL_TESTS = xpcshell
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/osfile/tests/moz.build
+++ b/toolkit/components/osfile/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['mochi']
 
 MODULE = 'test_osfile'
 
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini']
--- a/toolkit/components/passwordmgr/test/Makefile.in
+++ b/toolkit/components/passwordmgr/test/Makefile.in
@@ -7,17 +7,17 @@ DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(topsrcdir)/config/config.mk
 
 # Module name for xpcshell tests.
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 # Mochitest tests
 MOCHITEST_FILES = \
     test_basic_form.html \
     test_basic_form_html5.html \
     test_basic_form_2.html \
     test_basic_form_0pw.html \
     test_basic_form_1pw.html \
--- a/toolkit/components/passwordmgr/test/moz.build
+++ b/toolkit/components/passwordmgr/test/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['browser', 'auth2']
 
 MODULE = 'test_passwordmgr'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/places/tests/Makefile.in
+++ b/toolkit/components/places/tests/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir	= @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   autocomplete \
   bookmarks \
   expiration \
   favicons \
   inline \
   migration \
   network \
   queries \
--- a/toolkit/components/places/tests/moz.build
+++ b/toolkit/components/places/tests/moz.build
@@ -10,8 +10,19 @@ TEST_DIRS += [
     'mochitest/bug_461710',
     'browser',
 ]
 
 TEST_TOOL_DIRS += ['cpp']
 
 MODULE = 'test_places'
 
+XPCSHELL_TESTS_MANIFESTS += [
+    'autocomplete/xpcshell.ini',
+    'bookmarks/xpcshell.ini',
+    'expiration/xpcshell.ini',
+    'favicons/xpcshell.ini',
+    'inline/xpcshell.ini',
+    'migration/xpcshell.ini',
+    'network/xpcshell.ini',
+    'queries/xpcshell.ini',
+    'unit/xpcshell.ini',
+]
--- a/toolkit/components/satchel/test/Makefile.in
+++ b/toolkit/components/satchel/test/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH   = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH   = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   $(NULL)
 
 MOCHITEST_FILES = \
 		test_bug_511615.html \
 		test_bug_787624.html \
 		test_form_autocomplete.html \
 		test_form_autocomplete_with_list.html \
--- a/toolkit/components/satchel/test/moz.build
+++ b/toolkit/components/satchel/test/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['browser']
 
 MODULE = 'test_satchel'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/search/tests/Makefile.in
+++ b/toolkit/components/search/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = xpcshell
+DISABLED_XPCSHELL_TESTS = xpcshell
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/search/tests/moz.build
+++ b/toolkit/components/search/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_searchservice'
 
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini']
--- a/toolkit/components/social/test/Makefile.in
+++ b/toolkit/components/social/test/Makefile.in
@@ -5,13 +5,13 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   xpcshell \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/social/test/moz.build
+++ b/toolkit/components/social/test/moz.build
@@ -1,7 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['browser']
+
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini']
--- a/toolkit/components/startup/Makefile.in
+++ b/toolkit/components/startup/Makefile.in
@@ -28,11 +28,11 @@ else
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 CMMSRCS += nsUserInfoMac.mm
 else
 CPPSRCS += nsUserInfoUnix.cpp
 endif
 endif
 endif
 
-XPCSHELL_TESTS = tests/unit
+DISABLED_XPCSHELL_TESTS = tests/unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/startup/moz.build
+++ b/toolkit/components/startup/moz.build
@@ -9,8 +9,9 @@ DIRS += ['public']
 TEST_DIRS += ['tests/browser']
 
 MODULE = 'toolkitcomps'
 
 EXPORTS.mozilla += [
     'StartupTimeline.h',
 ]
 
+XPCSHELL_TESTS_MANIFESTS += ['tests/unit/xpcshell.ini']
--- a/toolkit/components/telemetry/tests/Makefile.in
+++ b/toolkit/components/telemetry/tests/Makefile.in
@@ -8,13 +8,13 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 #MODULE		= test_harness_telemetry
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
                  unit \
                  $(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/telemetry/tests/moz.build
+++ b/toolkit/components/telemetry/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/url-classifier/tests/Makefile.in
+++ b/toolkit/components/url-classifier/tests/Makefile.in
@@ -9,17 +9,17 @@ topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MOZILLA_INTERNAL_API = 1
 
-XPCSHELL_TESTS=unit
+DISABLED_XPCSHELL_TESTS=unit
 
 # XXX Get this to work in libxul builds.
 ## simple c++ tests (no xpcom)
 #CPP_UNIT_TESTS = \
 #	TestUrlClassifierUtils.cpp \
 #	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/url-classifier/tests/moz.build
+++ b/toolkit/components/url-classifier/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['mochitest']
 
 MODULE = 'test_url-classifier'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/components/urlformatter/tests/Makefile.in
+++ b/toolkit/components/urlformatter/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/components/urlformatter/tests/moz.build
+++ b/toolkit/components/urlformatter/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_urlformatter'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/content/tests/Makefile.in
+++ b/toolkit/content/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/content/tests/moz.build
+++ b/toolkit/content/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['chrome', 'widgets', 'browser']
 
 MODULE = 'test_toolkit_general'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/crashreporter/client/Makefile.in
+++ b/toolkit/crashreporter/client/Makefile.in
@@ -66,17 +66,17 @@ CPPSRCS += crashreporter_maemo_gtk.cpp
 # so we have to ship our own.
 libs:: $(DIST)/bin/crashreporter.crt
 
 $(DIST)/bin/crashreporter.crt: $(topsrcdir)/security/nss/lib/ckfw/builtins/certdata.txt certdata2pem.py
 	$(PYTHON) $(srcdir)/certdata2pem.py < $< > $@
 
 # The xpcshell test case here verifies that the CA certificate list
 # works with OpenSSL.
-XPCSHELL_TESTS = maemo-unit
+DISABLED_XPCSHELL_TESTS = maemo-unit
 
 else
 CPPSRCS += crashreporter_linux.cpp
 endif
 
 LIBS += \
   $(DEPTH)/toolkit/crashreporter/google-breakpad/src/common/linux/$(LIB_PREFIX)breakpad_linux_common_s.$(LIB_SUFFIX) \
   $(NULL)
--- a/toolkit/crashreporter/client/moz.build
+++ b/toolkit/crashreporter/client/moz.build
@@ -1,8 +1,11 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'crashreporter'
 
+# The xpcshell test case here verifies that the CA certificate list
+if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk2' and CONFIG['MOZ_PLATFORM_MAEMO']:
+    XPCSHELL_TESTS_MANIFESTS += ['maemo-unit/xpcshell.ini']
--- a/toolkit/crashreporter/test/Makefile.in
+++ b/toolkit/crashreporter/test/Makefile.in
@@ -6,17 +6,17 @@
 DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit unit_ipc
+DISABLED_XPCSHELL_TESTS = unit unit_ipc
 
 LIBRARY_NAME = testcrasher
 NO_DIST_INSTALL = 1
 
 FORCE_SHARED_LIB = 1
 
 VPATH += \
   $(srcdir)/../google-breakpad/src/processor/ \
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'crashreporter_test'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini', 'unit_ipc/xpcshell.ini']
--- a/toolkit/devtools/debugger/tests/Makefile.in
+++ b/toolkit/devtools/debugger/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH           = @DEPTH@
 topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/devtools/debugger/tests/moz.build
+++ b/toolkit/devtools/debugger/tests/moz.build
@@ -2,8 +2,10 @@
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['mochitest']
 
 MODULE = 'test_debugger'
+
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/devtools/sourcemap/tests/Makefile.in
+++ b/toolkit/devtools/sourcemap/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH           = @DEPTH@
 topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 relativesrcdir  = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/devtools/sourcemap/tests/moz.build
+++ b/toolkit/devtools/sourcemap/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_sourcemap'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/forgetaboutsite/test/Makefile.in
+++ b/toolkit/forgetaboutsite/test/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH   := @DEPTH@
 topsrcdir := @top_srcdir@
 srcdir    := @srcdir@
 VPATH   := @srcdir@
 relativesrcdir := @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS := unit
+DISABLED_XPCSHELL_TESTS := unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/forgetaboutsite/test/moz.build
+++ b/toolkit/forgetaboutsite/test/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['browser']
 
 MODULE = 'forgetaboutsite'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/identity/tests/Makefile.in
+++ b/toolkit/identity/tests/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/identity/tests/moz.build
+++ b/toolkit/identity/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['chrome', 'mochitest']
 
 MODULE = 'test_identity'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/modules/tests/Makefile.in
+++ b/toolkit/modules/tests/Makefile.in
@@ -5,12 +5,12 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = xpcshell
+DISABLED_XPCSHELL_TESTS = xpcshell
 
 include $(topsrcdir)/config/rules.mk
 
--- a/toolkit/modules/tests/moz.build
+++ b/toolkit/modules/tests/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell/xpcshell.ini']
--- a/toolkit/mozapps/downloads/tests/Makefile.in
+++ b/toolkit/mozapps/downloads/tests/Makefile.in
@@ -6,16 +6,16 @@
 DEPTH          = @DEPTH@
 topsrcdir      = @top_srcdir@
 srcdir         = @srcdir@
 VPATH          = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: 
 	$(INSTALL) $(topsrcdir)/testing/specialpowers/content/MockFilePicker.jsm $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit
--- a/toolkit/mozapps/downloads/tests/moz.build
+++ b/toolkit/mozapps/downloads/tests/moz.build
@@ -3,8 +3,9 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['chrome']
 
 MODULE = 'test_downloads'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/mozapps/extensions/test/Makefile.in
+++ b/toolkit/mozapps/extensions/test/Makefile.in
@@ -9,17 +9,17 @@ VPATH = @srcdir@
 ADDONSRC = $(srcdir)/addons
 relativesrcdir = @relativesrcdir@
 
 TESTROOT = $(CURDIR)/$(DEPTH)/_tests/xpcshell/$(relativesrcdir)
 TESTXPI = $(TESTROOT)/xpcshell/addons
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   xpcshell \
   xpcshell-unpack \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	rm -rf $(TESTXPI)
--- a/toolkit/mozapps/extensions/test/moz.build
+++ b/toolkit/mozapps/extensions/test/moz.build
@@ -4,8 +4,9 @@
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['MOZ_BUILD_APP'] != 'mobile':
     DIRS += ['xpinstall', 'browser', 'mochitest']
 
 MODULE = 'test_extensionmanager'
 
+XPCSHELL_TESTS_MANIFESTS += ['xpcshell-unpack/xpcshell.ini', 'xpcshell/xpcshell.ini']
--- a/toolkit/mozapps/shared/Makefile.in
+++ b/toolkit/mozapps/shared/Makefile.in
@@ -14,12 +14,12 @@ EXTRA_PP_JS_MODULES = \
   CertUtils.jsm \
   $(NULL)
 
 EXTRA_JS_MODULES = \
   FileUtils.jsm \
   $(NULL)
 
 ifdef ENABLE_TESTS
-XPCSHELL_TESTS = test/unit
+DISABLED_XPCSHELL_TESTS = test/unit
 endif
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/shared/moz.build
+++ b/toolkit/mozapps/shared/moz.build
@@ -3,8 +3,10 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 TEST_DIRS += ['test/chrome']
 
 MODULE = 'toolkitShared'
 
+if CONFIG['ENABLE_TESTS']:
+    XPCSHELL_TESTS_MANIFESTS += ['test/unit/xpcshell.ini']
--- a/toolkit/mozapps/update/test/Makefile.in
+++ b/toolkit/mozapps/update/test/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   $(NULL)
 
 TESTROOT = $(call core_abspath,$(DEPTH))/_tests/xpcshell/$(relativesrcdir)
 
 DEFINES += \
   -DAB_CD=$(AB_CD) \
   -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
--- a/toolkit/mozapps/update/test/moz.build
+++ b/toolkit/mozapps/update/test/moz.build
@@ -1,8 +1,10 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'android':
     DIRS += ['chrome']
+
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/mozapps/update/test_svc/Makefile.in
+++ b/toolkit/mozapps/update/test_svc/Makefile.in
@@ -5,17 +5,17 @@
 DEPTH     = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = \
+DISABLED_XPCSHELL_TESTS = \
   unit \
   $(NULL)
 
 TESTROOT = $(call core_abspath,$(DEPTH))/_tests/xpcshell/$(relativesrcdir)
 
 DEFINES += \
   -DAB_CD=$(AB_CD) \
   -DMOZ_APP_NAME=$(MOZ_APP_NAME) \
--- a/toolkit/mozapps/update/test_svc/moz.build
+++ b/toolkit/mozapps/update/test_svc/moz.build
@@ -1,6 +1,7 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/toolkit/mozapps/update/test_timermanager/Makefile.in
+++ b/toolkit/mozapps/update/test_timermanager/Makefile.in
@@ -5,11 +5,11 @@
 DEPTH = @DEPTH@
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/mozapps/update/test_timermanager/moz.build
+++ b/toolkit/mozapps/update/test_timermanager/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_timermanager'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/tools/profiler/Makefile.in
+++ b/tools/profiler/Makefile.in
@@ -5,17 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DEPTH       = @DEPTH@
 topsrcdir   = @top_srcdir@
 srcdir      = @srcdir@
 VPATH       = $(srcdir)
 relativesrcdir = @relativesrcdir@
 
-XPCSHELL_TESTS = tests
+DISABLED_XPCSHELL_TESTS = tests
 
 include $(DEPTH)/config/autoconf.mk
 
 ifdef MOZ_ENABLE_PROFILER_SPS
 LOCAL_INCLUDES += \
   -I$(topsrcdir)/mozglue/linker \
   -I$(topsrcdir)/ipc/chromium/src \
   -I$(topsrcdir)/toolkit/crashreporter/google-breakpad/src \
--- a/tools/profiler/moz.build
+++ b/tools/profiler/moz.build
@@ -16,8 +16,9 @@ if CONFIG['MOZ_ENABLE_PROFILER_SPS']:
         'PseudoStack.h',
         'shared-libraries.h',
     ]
 
 EXPORTS += [
     'GeckoProfiler.h',
 ]
 
+XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']
--- a/uriloader/exthandler/tests/Makefile.in
+++ b/uriloader/exthandler/tests/Makefile.in
@@ -5,22 +5,22 @@
 DEPTH           = @DEPTH@
 topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
 relativesrcdir = @relativesrcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 FAIL_ON_WARNINGS = 1
 
 #FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
-XPCSHELL_TESTS += unit_ipc
+DISABLED_XPCSHELL_TESTS += unit_ipc
 endif
 
 CPPSRCS =	\
 		WriteArgument.cpp \
 		$(NULL)
 
 SIMPLE_PROGRAMS = $(CPPSRCS:.cpp=$(BIN_SUFFIX))
 
--- a/uriloader/exthandler/tests/moz.build
+++ b/uriloader/exthandler/tests/moz.build
@@ -3,8 +3,13 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += ['mochitest']
 
 MODULE = 'test_uriloader_exthandler'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
+
+#FIXME/bug 575918: out-of-process xpcshell is broken on OS X
+if CONFIG['OS_ARCH'] != 'Darwin':
+    XPCSHELL_TESTS_MANIFESTS += ['unit_ipc/xpcshell.ini']
--- a/widget/tests/Makefile.in
+++ b/widget/tests/Makefile.in
@@ -7,17 +7,17 @@ DEPTH		= @DEPTH@
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = @relativesrcdir@
 FAIL_ON_WARNINGS = 1
 
 include $(DEPTH)/config/autoconf.mk
 
-XPCSHELL_TESTS  = unit
+DISABLED_XPCSHELL_TESTS  = unit
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 
 ifdef NS_ENABLE_TSF
 #Test disabled because it uses the internal string APIs incorrectly (see bug 582863)
 #CPP_UNIT_TESTS += TestWinTSF.cpp  \
 #                  $(NULL)
 endif
--- a/widget/tests/moz.build
+++ b/widget/tests/moz.build
@@ -1,8 +1,9 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 MODULE = 'test_widget'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']
--- a/xpcom/tests/Makefile.in
+++ b/xpcom/tests/Makefile.in
@@ -108,17 +108,17 @@ include $(topsrcdir)/config/config.mk
 
 LIBS += $(XPCOM_LIBS)
 
 # Needed to resolve __yylex (?)
 ifeq ($(OS_ARCH)$(OS_RELEASE),FreeBSD2)
 LIBS		+= -lpcap
 endif
 
-XPCSHELL_TESTS = unit
+DISABLED_XPCSHELL_TESTS = unit
 
 # Make sure we have symbols in case we need to debug these.
 MOZ_DEBUG_SYMBOLS = 1
 
 include $(topsrcdir)/config/rules.mk
 
 LOCAL_INCLUDES	= \
                 -I$(srcdir)/../ds \
--- a/xpcom/tests/moz.build
+++ b/xpcom/tests/moz.build
@@ -14,8 +14,9 @@ DIRS += [
 if CONFIG['OS_ARCH'] == 'WINNT':
     DIRS += ['windows']
 
 if CONFIG['DEHYDRA_PATH']:
     DIRS += ['static-checker']
 
 MODULE = 'xpcom'
 
+XPCSHELL_TESTS_MANIFESTS += ['unit/xpcshell.ini']