Backout 4997c6f8b24d (bug 616542) for causing locally run mochitest-browser-chrome test runs to fail
authorEd Morley <bmo@edmorley.co.uk>
Sat, 05 Nov 2011 18:35:59 +0000
changeset 79825 e697147121b3258da64e1cea557bc43ded0987ce
parent 79824 b78ada5e3d701458bd1d53bdec12dbc925d6dd41
child 79826 ae228e329b421e35e2b5b8e70586af6fa8c1fb29
child 79835 b6d9a07df7f635feeb255a91548020aa09c9548f
child 79855 8fa7e7a6851e0543fe702e9fe6d7a5a1e8f2cd5c
push id21427
push userbmo@edmorley.co.uk
push dateSat, 05 Nov 2011 18:44:11 +0000
treeherdermozilla-central@e697147121b3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs616542
milestone10.0a1
backs out4997c6f8b24d2254283aef94a5b5b1ce5274c634
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Backout 4997c6f8b24d (bug 616542) for causing locally run mochitest-browser-chrome test runs to fail
Makefile.in
accessible/tests/mochitest/Makefile.in
accessible/tests/mochitest/actions/Makefile.in
accessible/tests/mochitest/attributes/Makefile.in
accessible/tests/mochitest/editabletext/Makefile.in
accessible/tests/mochitest/events/Makefile.in
accessible/tests/mochitest/focus/Makefile.in
accessible/tests/mochitest/hyperlink/Makefile.in
accessible/tests/mochitest/hypertext/Makefile.in
accessible/tests/mochitest/name/Makefile.in
accessible/tests/mochitest/relations/Makefile.in
accessible/tests/mochitest/selectable/Makefile.in
accessible/tests/mochitest/states/Makefile.in
accessible/tests/mochitest/table/Makefile.in
accessible/tests/mochitest/text/Makefile.in
accessible/tests/mochitest/textselection/Makefile.in
accessible/tests/mochitest/tree/Makefile.in
accessible/tests/mochitest/treeupdate/Makefile.in
accessible/tests/mochitest/value/Makefile.in
browser/base/content/test/Makefile.in
browser/components/certerror/test/Makefile.in
browser/components/feeds/test/Makefile.in
browser/components/feeds/test/chrome/Makefile.in
browser/components/places/tests/browser/Makefile.in
browser/components/places/tests/chrome/Makefile.in
browser/components/preferences/tests/Makefile.in
browser/components/privatebrowsing/test/browser/Makefile.in
browser/components/safebrowsing/content/test/Makefile.in
browser/components/search/test/Makefile.in
browser/components/sessionstore/test/browser/Makefile.in
browser/components/shell/test/Makefile.in
browser/components/tabview/test/Makefile.in
browser/components/test/browser/Makefile.in
browser/components/wintaskbar/test/Makefile.in
browser/devtools/highlighter/test/Makefile.in
browser/devtools/scratchpad/test/Makefile.in
browser/devtools/shared/test/Makefile.in
browser/devtools/sourceeditor/test/Makefile.in
browser/devtools/styleinspector/test/browser/Makefile.in
browser/devtools/webconsole/test/browser/Makefile.in
browser/fuel/test/Makefile.in
caps/tests/mochitest/Makefile.in
config/config.mk
content/base/test/Makefile.in
content/base/test/chrome/Makefile.in
content/canvas/test/Makefile.in
content/canvas/test/crossorigin/Makefile.in
content/canvas/test/webgl/Makefile.in
content/events/test/Makefile.in
content/html/content/test/Makefile.in
content/html/content/test/bug649134/Makefile.in
content/html/content/test/forms/Makefile.in
content/html/document/test/Makefile.in
content/media/test/Makefile.in
content/smil/test/Makefile.in
content/svg/content/test/Makefile.in
content/xbl/test/Makefile.in
content/xml/document/test/Makefile.in
content/xslt/tests/mochitest/Makefile.in
content/xul/content/test/Makefile.in
content/xul/document/test/Makefile.in
content/xul/templates/tests/chrome/Makefile.in
docshell/test/Makefile.in
docshell/test/browser/Makefile.in
docshell/test/chrome/Makefile.in
docshell/test/navigation/Makefile.in
dom/indexedDB/test/Makefile.in
dom/ipc/tests/Makefile.in
dom/plugins/test/mochitest/Makefile.in
dom/src/foo/Makefile.in
dom/src/json/test/Makefile.in
dom/src/jsurl/test/Makefile.in
dom/tests/browser/Makefile.in
dom/tests/mochitest/ajax/jquery/Makefile.in
dom/tests/mochitest/ajax/jquery/dist/Makefile.in
dom/tests/mochitest/ajax/jquery/test/Makefile.in
dom/tests/mochitest/ajax/jquery/test/data/Makefile.in
dom/tests/mochitest/ajax/jquery/test/data/offset/Makefile.in
dom/tests/mochitest/ajax/jquery/test/unit/Makefile.in
dom/tests/mochitest/ajax/lib/Makefile.in
dom/tests/mochitest/ajax/mochikit/Makefile.in
dom/tests/mochitest/ajax/mochikit/MochiKit/Makefile.in
dom/tests/mochitest/ajax/mochikit/tests/Makefile.in
dom/tests/mochitest/ajax/mochikit/tests/SimpleTest/Makefile.in
dom/tests/mochitest/ajax/offline/Makefile.in
dom/tests/mochitest/ajax/offline/namespace1/Makefile.in
dom/tests/mochitest/ajax/offline/namespace1/sub/Makefile.in
dom/tests/mochitest/ajax/offline/namespace1/sub2/Makefile.in
dom/tests/mochitest/ajax/offline/namespace2/Makefile.in
dom/tests/mochitest/ajax/prototype/Makefile.in
dom/tests/mochitest/ajax/prototype/dist/Makefile.in
dom/tests/mochitest/ajax/prototype/test/Makefile.in
dom/tests/mochitest/ajax/prototype/test/functional/Makefile.in
dom/tests/mochitest/ajax/prototype/test/lib/Makefile.in
dom/tests/mochitest/ajax/prototype/test/unit/Makefile.in
dom/tests/mochitest/ajax/prototype/test/unit/fixtures/Makefile.in
dom/tests/mochitest/ajax/prototype/test/unit/tmp/Makefile.in
dom/tests/mochitest/ajax/scriptaculous/Makefile.in
dom/tests/mochitest/ajax/scriptaculous/lib/Makefile.in
dom/tests/mochitest/ajax/scriptaculous/src/Makefile.in
dom/tests/mochitest/ajax/scriptaculous/test/unit/Makefile.in
dom/tests/mochitest/bugs/Makefile.in
dom/tests/mochitest/chrome/Makefile.in
dom/tests/mochitest/dom-level0/Makefile.in
dom/tests/mochitest/dom-level1-core/Makefile.in
dom/tests/mochitest/dom-level1-core/files/Makefile.in
dom/tests/mochitest/dom-level2-core/Makefile.in
dom/tests/mochitest/dom-level2-core/files/Makefile.in
dom/tests/mochitest/dom-level2-html/Makefile.in
dom/tests/mochitest/dom-level2-html/files/Makefile.in
dom/tests/mochitest/general/Makefile.in
dom/tests/mochitest/geolocation/Makefile.in
dom/tests/mochitest/globalstorage/Makefile.in
dom/tests/mochitest/localstorage/Makefile.in
dom/tests/mochitest/notification/Makefile.in
dom/tests/mochitest/orientation/Makefile.in
dom/tests/mochitest/sessionstorage/Makefile.in
dom/tests/mochitest/storageevent/Makefile.in
dom/tests/mochitest/whatwg/Makefile.in
dom/workers/test/Makefile.in
dom/workers/test/extensions/bootstrap/Makefile.in
dom/workers/test/extensions/traditional/Makefile.in
editor/composer/test/Makefile.in
editor/libeditor/base/tests/Makefile.in
editor/libeditor/html/tests/Makefile.in
editor/libeditor/text/tests/Makefile.in
embedding/test/Makefile.in
extensions/cookie/test/Makefile.in
extensions/spellcheck/tests/chrome/Makefile.in
extensions/spellcheck/tests/chrome/base/Makefile.in
extensions/spellcheck/tests/chrome/map/Makefile.in
extensions/universalchardet/tests/Makefile.in
gfx/tests/Makefile.in
image/test/browser/Makefile.in
image/test/mochitest/Makefile.in
intl/uconv/tests/Makefile.in
js/jetpack/tests/Makefile.in
js/jsd/test/Makefile.in
js/src/config/config.mk
js/xpconnect/tests/chrome/Makefile.in
js/xpconnect/tests/mochitest/Makefile.in
layout/base/tests/Makefile.in
layout/base/tests/chrome/Makefile.in
layout/forms/test/Makefile.in
layout/generic/test/Makefile.in
layout/inspector/tests/Makefile.in
layout/inspector/tests/chrome/Makefile.in
layout/reftests/fonts/Makefile.in
layout/reftests/fonts/mplus/Makefile.in
layout/style/test/Makefile.in
layout/style/test/chrome/Makefile.in
layout/tables/test/Makefile.in
layout/xul/base/test/Makefile.in
layout/xul/test/Makefile.in
mobile/chrome/tests/Makefile.in
modules/libjar/test/chrome/Makefile.in
modules/libjar/test/mochitest/Makefile.in
netwerk/test/browser/Makefile.in
parser/htmlparser/tests/mochitest/Makefile.in
parser/htmlparser/tests/mochitest/dir_bug534293/Makefile.in
parser/htmlparser/tests/mochitest/html5lib_tree_construction/Makefile.in
parser/htmlparser/tests/mochitest/html5lib_tree_construction/scripted/Makefile.in
security/manager/ssl/tests/mochitest/bugs/Makefile.in
security/manager/ssl/tests/mochitest/mixedcontent/Makefile.in
security/manager/ssl/tests/mochitest/stricttransportsecurity/Makefile.in
testing/mochitest/Makefile.in
testing/mochitest/MochiKit/Makefile.in
testing/mochitest/chrome/Makefile.in
testing/mochitest/dynamic/Makefile.in
testing/mochitest/runtests.py
testing/mochitest/specialpowers/Makefile.in
testing/mochitest/static/Makefile.in
testing/mochitest/tests/Makefile.in
testing/mochitest/tests/MochiKit-1.4.2/MochiKit/Makefile.in
testing/mochitest/tests/MochiKit-1.4.2/tests/Makefile.in
testing/mochitest/tests/MochiKit-1.4.2/tests/SimpleTest/Makefile.in
testing/mochitest/tests/SimpleTest/Makefile.in
testing/mochitest/tests/browser/Makefile.in
testing/testsuite-targets.mk
toolkit/components/aboutmemory/tests/chrome/Makefile.in
toolkit/components/alerts/test/Makefile.in
toolkit/components/ctypes/tests/Makefile.in
toolkit/components/downloads/test/browser/Makefile.in
toolkit/components/feeds/test/Makefile.in
toolkit/components/microformats/tests/Makefile.in
toolkit/components/passwordmgr/test/Makefile.in
toolkit/components/passwordmgr/test/browser/Makefile.in
toolkit/components/perf/Makefile.in
toolkit/components/places/tests/Makefile.in
toolkit/components/places/tests/browser/Makefile.in
toolkit/components/places/tests/chrome/Makefile.in
toolkit/components/places/tests/mochitest/bug_411966/Makefile.in
toolkit/components/places/tests/mochitest/bug_461710/Makefile.in
toolkit/components/prompts/test/Makefile.in
toolkit/components/satchel/test/Makefile.in
toolkit/components/startup/tests/browser/Makefile.in
toolkit/components/url-classifier/tests/mochitest/Makefile.in
toolkit/components/viewsource/test/Makefile.in
toolkit/content/tests/browser/Makefile.in
toolkit/content/tests/browser/common/Makefile.in
toolkit/content/tests/browser/data/Makefile.in
toolkit/content/tests/chrome/Makefile.in
toolkit/content/tests/chrome/rtlchrome/Makefile.in
toolkit/content/tests/chrome/rtltest/Makefile.in
toolkit/content/tests/widgets/Makefile.in
toolkit/crashreporter/test/Makefile.in
toolkit/mozapps/downloads/tests/chrome/Makefile.in
toolkit/mozapps/extensions/test/browser/Makefile.in
toolkit/mozapps/extensions/test/mochitest/Makefile.in
toolkit/mozapps/extensions/test/xpinstall/Makefile.in
toolkit/mozapps/plugins/tests/Makefile.in
toolkit/mozapps/shared/test/chrome/Makefile.in
toolkit/mozapps/update/test/chrome/Makefile.in
toolkit/profile/test/Makefile.in
toolkit/themes/pinstripe/mochitests/Makefile.in
toolkit/xre/test/Makefile.in
uriloader/exthandler/tests/mochitest/Makefile.in
widget/tests/Makefile.in
xpinstall/tests/Makefile.in
--- a/Makefile.in
+++ b/Makefile.in
@@ -88,17 +88,16 @@ DIST_GARBAGE = config.cache config.log c
 
 default alldep all:: $(topsrcdir)/configure config.status
 	$(RM) -r $(DIST)/sdk
 	$(RM) -r $(DIST)/include
 	$(RM) -r $(DIST)/private
 	$(RM) -r $(DIST)/public
 	$(RM) -r $(DIST)/bin/components
 	$(RM) -r _tests
-	$(RM) -r $(mochitestdir)
 
 $(topsrcdir)/configure: $(topsrcdir)/configure.in
 	@echo "STOP!  configure.in has changed, and your configure is out of date."
 	@echo "Please rerun autoconf and re-configure your build directory."
 	@echo "To ignore this message, touch 'configure' in the source directory,"
 	@echo "but your build might not succeed."
 	@exit 1
 
--- a/accessible/tests/mochitest/Makefile.in
+++ b/accessible/tests/mochitest/Makefile.in
@@ -108,9 +108,9 @@ include $(topsrcdir)/config/rules.mk
 		test_textboxes.xul \
 		testTextboxes.js \
 		text.js \
 		treeview.css \
 		treeview.js \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/actions/Makefile.in
+++ b/accessible/tests/mochitest/actions/Makefile.in
@@ -56,9 +56,9 @@ include $(topsrcdir)/config/rules.mk
 		test_link.html \
 		test_media.html \
 		test_select.html \
 		test_tree.xul \
 		test_treegrid.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/attributes/Makefile.in
+++ b/accessible/tests/mochitest/attributes/Makefile.in
@@ -50,9 +50,9 @@ include $(topsrcdir)/config/rules.mk
 		test_obj_css.html \
 		test_obj_group.html \
 		test_obj_group.xul \
 		test_obj_group_tree.xul \
 		test_text.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/editabletext/Makefile.in
+++ b/accessible/tests/mochitest/editabletext/Makefile.in
@@ -47,9 +47,9 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =\
 		editabletext.js \
 		test_1.html \
 		test_2.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/events/Makefile.in
+++ b/accessible/tests/mochitest/events/Makefile.in
@@ -89,9 +89,9 @@ include $(topsrcdir)/config/rules.mk
 		test_text_alg.html \
 		test_text.html \
 		test_textattrchange.html \
 		test_tree.xul \
 		test_valuechange.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/focus/Makefile.in
+++ b/accessible/tests/mochitest/focus/Makefile.in
@@ -46,9 +46,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =\
 		test_focusedChild.html \
 		test_takeFocus.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/hyperlink/Makefile.in
+++ b/accessible/tests/mochitest/hyperlink/Makefile.in
@@ -47,9 +47,9 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =\
 		hyperlink.js \
 		test_general.html \
 		test_general.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/hypertext/Makefile.in
+++ b/accessible/tests/mochitest/hypertext/Makefile.in
@@ -46,9 +46,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		test_general.html \
 		test_update.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/name/Makefile.in
+++ b/accessible/tests/mochitest/name/Makefile.in
@@ -57,9 +57,9 @@ include $(topsrcdir)/config/rules.mk
 		test_list.html \
 		test_markup.html \
 		test_nsRootAcc.xul \
 		test_tree.xul \
 		markuprules.xml \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/relations/Makefile.in
+++ b/accessible/tests/mochitest/relations/Makefile.in
@@ -49,9 +49,9 @@ include $(topsrcdir)/config/rules.mk
 		test_general.html \
 		test_general.xul \
 		test_tabbrowser.xul \
 		test_tree.xul \
 		test_update.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/selectable/Makefile.in
+++ b/accessible/tests/mochitest/selectable/Makefile.in
@@ -50,9 +50,9 @@ include $(topsrcdir)/config/rules.mk
 		test_listbox.xul \
 		test_menu.xul \
 		test_menulist.xul \
 		test_select.html \
 		test_tree.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/states/Makefile.in
+++ b/accessible/tests/mochitest/states/Makefile.in
@@ -66,9 +66,9 @@ include $(topsrcdir)/config/rules.mk
 		z_frames.html \
 		z_frames_article.html \
 		z_frames_checkbox.html \
 		z_frames_textbox.html \
 		z_frames_update.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/table/Makefile.in
+++ b/accessible/tests/mochitest/table/Makefile.in
@@ -64,9 +64,9 @@ include $(topsrcdir)/config/rules.mk
 		test_struct_listbox.xul \
 		test_struct_table.html \
 		test_struct_tree.xul \
 		test_table_1.html \
 		test_table_2.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/text/Makefile.in
+++ b/accessible/tests/mochitest/text/Makefile.in
@@ -51,9 +51,9 @@ include $(topsrcdir)/config/rules.mk
 		test_hypertext.html \
 		test_passwords.html \
 		test_singleline.html \
 		test_whitespaces.html \
 		test_words.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/textselection/Makefile.in
+++ b/accessible/tests/mochitest/textselection/Makefile.in
@@ -45,9 +45,9 @@ relativesrcdir  = accessible/textselecti
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		test_general.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/tree/Makefile.in
+++ b/accessible/tests/mochitest/tree/Makefile.in
@@ -74,9 +74,9 @@ include $(topsrcdir)/config/rules.mk
 		test_tree.xul \
 		test_txtcntr.html \
 		test_txtctrl.html \
 		test_txtctrl.xul \
 		wnd.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/treeupdate/Makefile.in
+++ b/accessible/tests/mochitest/treeupdate/Makefile.in
@@ -58,9 +58,9 @@ include $(topsrcdir)/config/rules.mk
 		test_recreation.html \
 		test_select.html \
 		test_textleaf.html \
 		test_visibility.html \
 		test_whitespace.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/accessible/tests/mochitest/value/Makefile.in
+++ b/accessible/tests/mochitest/value/Makefile.in
@@ -47,9 +47,9 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =\
 		test_general.html \
 		test_progress.html \
 		test_progress.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/a11y/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/a11y/$(relativesrcdir)
--- a/browser/base/content/test/Makefile.in
+++ b/browser/base/content/test/Makefile.in
@@ -260,12 +260,12 @@ else
 		$(NULL)
 
 # TODO: Activate after carbon test plugin lands, bug 628651
 # 		browser_maconly_carbon_mismatch_plugin.js \
 
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/certerror/test/Makefile.in
+++ b/browser/components/certerror/test/Makefile.in
@@ -44,10 +44,10 @@ relativesrcdir  = browser/components/cer
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = browser_bug431826.js \
     $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
--- a/browser/components/feeds/test/Makefile.in
+++ b/browser/components/feeds/test/Makefile.in
@@ -56,9 +56,9 @@ include $(topsrcdir)/config/rules.mk
 		test_bug494328.html \
 		bug494328-data.xml \
 		test_bug589543.html \
 		bug589543-data.xml \
 		test_registerHandler.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/browser/components/feeds/test/chrome/Makefile.in
+++ b/browser/components/feeds/test/chrome/Makefile.in
@@ -51,13 +51,13 @@ include $(topsrcdir)/config/rules.mk
 
 _CHROME_FILES	= \
 		test_423060.xul \
 		test_bug368464.html \
 		test_bug408328.html \
 		$(NULL)
 
 libs:: $(_HTTP_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/browser/components/places/tests/browser/Makefile.in
+++ b/browser/components/places/tests/browser/Makefile.in
@@ -74,9 +74,9 @@ include $(topsrcdir)/config/rules.mk
 	browser_toolbar_migration.js \
 	browser_library_batch_delete.js \
 	browser_555547.js \
 	browser_416459_cut.js \
 	browser_library_downloads.js \
 	$(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/places/tests/chrome/Makefile.in
+++ b/browser/components/places/tests/chrome/Makefile.in
@@ -51,9 +51,9 @@ include $(topsrcdir)/config/rules.mk
 	test_0_bug510634.xul \
 	test_bug549192.xul \
 	test_bug549491.xul \
 	test_editBookmarkOverlay_tags_liveUpdate.xul \
 	test_bug631374_tags_selector_scroll.xul \
 	$(NULL)
 
 libs:: $(_CHROME_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/browser/components/preferences/tests/Makefile.in
+++ b/browser/components/preferences/tests/Makefile.in
@@ -55,9 +55,9 @@ include $(topsrcdir)/config/rules.mk
     browser_privacypane_6.js \
     browser_privacypane_7.js \
     browser_privacypane_8.js \
     browser_permissions.js \
     browser_chunk_permissions.js \
     $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/privatebrowsing/test/browser/Makefile.in
+++ b/browser/components/privatebrowsing/test/browser/Makefile.in
@@ -94,9 +94,9 @@ ifneq (Linux,$(OS_ARCH))
 _BROWSER_TEST_FILES += \
 		browser_privatebrowsing_beforeunload_enter.js \
 		browser_privatebrowsing_beforeunload_exit.js \
 		browser_privatebrowsing_cookieacceptdialog.js \
 		$(NULL)
 endif
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/safebrowsing/content/test/Makefile.in
+++ b/browser/components/safebrowsing/content/test/Makefile.in
@@ -51,10 +51,10 @@ ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 _NON_MAC_BROWSER_TESTS = browser_bug415846.js
 endif
 
 _BROWSER_FILES = browser_bug400731.js \
                  $(_NON_MAC_BROWSER_TESTS) \
     $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
--- a/browser/components/search/test/Makefile.in
+++ b/browser/components/search/test/Makefile.in
@@ -52,9 +52,9 @@ include $(topsrcdir)/config/rules.mk
 	                  426329.xml \
 	                  browser_483086.js \
 	                  483086-1.xml \
 	                  483086-2.xml \
 	                  test.html \
 	                  $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/sessionstore/test/browser/Makefile.in
+++ b/browser/components/sessionstore/test/browser/Makefile.in
@@ -163,9 +163,9 @@ include $(topsrcdir)/config/rules.mk
 ifneq ($(OS_ARCH),Darwin)
 _BROWSER_TEST_FILES += \
 	browser_597071.js \
 	browser_625016.js \
 	$(NULL)
 endif
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/shell/test/Makefile.in
+++ b/browser/components/shell/test/Makefile.in
@@ -47,9 +47,9 @@ XPCSHELL_TESTS	= unit
 
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_TEST_FILES = browser_420786.js \
     browser_633221.js \
 	$(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/tabview/test/Makefile.in
+++ b/browser/components/tabview/test/Makefile.in
@@ -184,9 +184,9 @@ include $(topsrcdir)/config/rules.mk
                  head.js \
                  search1.html \
                  search2.html \
                  test_bug600645.html \
                  test_bug644097.html \
                  $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/test/browser/Makefile.in
+++ b/browser/components/test/browser/Makefile.in
@@ -44,9 +44,9 @@ relativesrcdir  = browser/components/tes
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_TEST_FILES = \
   browser_bug538331.js \
   $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/components/wintaskbar/test/Makefile.in
+++ b/browser/components/wintaskbar/test/Makefile.in
@@ -44,11 +44,11 @@ relativesrcdir  = browser/components/win
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = browser_taskbar_preview.js \
     $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 
--- a/browser/devtools/highlighter/test/Makefile.in
+++ b/browser/devtools/highlighter/test/Makefile.in
@@ -66,9 +66,9 @@ include $(topsrcdir)/config/rules.mk
 		browser_inspector_breadcrumbs.html \
 		browser_inspector_breadcrumbs.js \
 		$(NULL)
 
 # Disabled due to constant failures
 # 		browser_inspector_treePanel_click.js \
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/devtools/scratchpad/test/Makefile.in
+++ b/browser/devtools/scratchpad/test/Makefile.in
@@ -54,9 +54,9 @@ include $(topsrcdir)/config/rules.mk
 		browser_scratchpad_bug_646070_chrome_context_pref.js \
 		browser_scratchpad_bug_660560_tab.js \
 		browser_scratchpad_open.js \
 		browser_scratchpad_restore.js \
 		browser_scratchpad_bug_679467_falsy.js \
 		browser_scratchpad_bug_699130_edit_ui_updates.js \
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/devtools/shared/test/Makefile.in
+++ b/browser/devtools/shared/test/Makefile.in
@@ -52,12 +52,12 @@ include $(topsrcdir)/config/rules.mk
   head.js \
   $(NULL)
 
 _BROWSER_TEST_PAGES = \
   browser_templater_basic.html \
   $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs:: $(_BROWSER_TEST_PAGES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/devtools/sourceeditor/test/Makefile.in
+++ b/browser/devtools/sourceeditor/test/Makefile.in
@@ -47,9 +47,9 @@ include $(topsrcdir)/config/rules.mk
 _BROWSER_TEST_FILES = \
 		browser_sourceeditor_initialization.js \
 		browser_bug684862_paste_html.js \
 		browser_bug687573_vscroll.js \
 		browser_bug687568_pagescroll.js \
 		browser_bug687580_drag_and_drop.js \
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/devtools/styleinspector/test/browser/Makefile.in
+++ b/browser/devtools/styleinspector/test/browser/Makefile.in
@@ -60,12 +60,12 @@ include $(topsrcdir)/config/rules.mk
   $(NULL)
 
 _BROWSER_TEST_PAGES = \
   browser_styleinspector_webconsole.htm \
   browser_bug683672.html \
   $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs:: $(_BROWSER_TEST_PAGES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/devtools/webconsole/test/browser/Makefile.in
+++ b/browser/devtools/webconsole/test/browser/Makefile.in
@@ -220,12 +220,12 @@ include $(topsrcdir)/config/rules.mk
 	test-bug-646025-console-file-location.html \
 	test-bug-678816-content.js \
 	test-file-location.js \
 	browser_gcli_inspect.html \
 	test-bug-658368-time-methods.html \
 	$(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs:: $(_BROWSER_TEST_PAGES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/browser/fuel/test/Makefile.in
+++ b/browser/fuel/test/Makefile.in
@@ -51,9 +51,9 @@ include $(topsrcdir)/config/rules.mk
 		browser_Bookmarks.js \
 		browser_Browser.js \
 		ContentA.html \
 		ContentB.html \
 		ContentWithFrames.html \
 		$(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/caps/tests/mochitest/Makefile.in
+++ b/caps/tests/mochitest/Makefile.in
@@ -53,9 +53,9 @@ include $(topsrcdir)/config/rules.mk
 
 test_bug292789.html : % : %.in
 	$(PYTHON) $(topsrcdir)/config/Preprocessor.py \
 	     $(AUTOMATION_PPARGS) $(DEFINES) $(ACDEFINES) $< > $@
 
 GARBAGE += test_bug292789.html
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/config/config.mk
+++ b/config/config.mk
@@ -51,20 +51,16 @@ endif
 INCLUDED_CONFIG_MK = 1
 
 EXIT_ON_ERROR = set -e; # Shell loops continue past errors without this.
 
 ifndef topsrcdir
 topsrcdir	= $(DEPTH)
 endif
 
-ifndef mochitestdir
-mochitestdir	= _mochitest
-endif
-
 ifndef INCLUDED_AUTOCONF_MK
 include $(DEPTH)/config/autoconf.mk
 endif
 
 COMMA = ,
 
 # Sanity check some variables
 CHECK_VARS := \
--- a/content/base/test/Makefile.in
+++ b/content/base/test/Makefile.in
@@ -541,19 +541,19 @@ endif
 #		test_bug503473.html \
 #		file_bug503473-frame.sjs \
 
 _BROWSER_TEST_FILES = \
 		browser_bug593387.js \
 		$(NULL)
 
 libs:: $(_TEST_FILES1)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_TEST_FILES2)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/content/base/test/chrome/Makefile.in
+++ b/content/base/test/chrome/Makefile.in
@@ -69,12 +69,12 @@ include $(topsrcdir)/config/rules.mk
     test_bug357450.xul \
     test_bug571390.xul \
     test_bug574596.html \
     test_bug683852.xul \
     test_bug599295.html \
     $(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/content/canvas/test/Makefile.in
+++ b/content/canvas/test/Makefile.in
@@ -174,9 +174,9 @@ endif
 #	test_2d.gradient.radial.cone.behind.html \
 #	test_2d.gradient.radial.cone.beside.html \
 
 # This test is bogus according to the spec; see bug 407107
 # test_2d.path.rect.zero.6.html
 
 # split up into groups to work around command-line length limits
 libs:: $(_TEST_FILES_0)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/canvas/test/crossorigin/Makefile.in
+++ b/content/canvas/test/crossorigin/Makefile.in
@@ -49,9 +49,9 @@ include $(topsrcdir)/config/rules.mk
 	image-allow-star.png \
 	image-allow-star.png^headers^ \
 	image.png \
 	test_canvas2d_crossorigin.html \
 	test_webgl_crossorigin_textures.html \
 	$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/canvas/test/webgl/Makefile.in
+++ b/content/canvas/test/webgl/Makefile.in
@@ -47,13 +47,13 @@ include $(topsrcdir)/config/rules.mk
   test_webgl_conformance_test_suite.html \
   00_test_list.txt \
   failing_tests_linux.txt \
   failing_tests_windows.txt \
   failing_tests_mac.txt \
   $(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 	$(TAR) -cf - -C $(srcdir) \
 	  resources \
 	  conformance \
-	  | $(TAR) -xf - -C $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	  | $(TAR) -xf - -C $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/events/test/Makefile.in
+++ b/content/events/test/Makefile.in
@@ -142,12 +142,12 @@ endif
 		test_bug602962.xul \
 		test_bug617528.xul \
 		window_bug617528.xul \
 		test_bug679494.xul \
 		file_bug679494.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/content/html/content/test/Makefile.in
+++ b/content/html/content/test/Makefile.in
@@ -288,9 +288,9 @@ include $(topsrcdir)/config/rules.mk
 		file_fullscreen-navigation.html \
 		test_li_attributes_reflection.html \
 		test_ol_attributes_reflection.html \
 		test_bug651956.html \
 		test_bug694503.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/html/content/test/bug649134/Makefile.in
+++ b/content/html/content/test/bug649134/Makefile.in
@@ -42,9 +42,9 @@ VPATH          = @srcdir@
 relativesrcdir = content/html/content/test/bug649134
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = file_bug649134-1.sjs file_bug649134-2.sjs index.html
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/html/content/test/forms/Makefile.in
+++ b/content/html/content/test/forms/Makefile.in
@@ -62,10 +62,10 @@ include $(topsrcdir)/config/rules.mk
 		test_textarea_attributes_reflection.html \
 		test_validation.html \
 		test_maxlength_attribute.html \
 		test_datalist_element.html \
 		test_form_attributes_reflection.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
--- a/content/html/document/test/Makefile.in
+++ b/content/html/document/test/Makefile.in
@@ -110,14 +110,14 @@ include $(topsrcdir)/config/rules.mk
 ifneq (mobile,$(MOZ_BUILD_APP))
 _BROWSER_TEST_FILES = \
 		browser_bug592641.js \
 		bug592641_img.jpg \
 		$(NULL)
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 ifneq (mobile,$(MOZ_BUILD_APP))
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 endif
--- a/content/media/test/Makefile.in
+++ b/content/media/test/Makefile.in
@@ -298,9 +298,9 @@ ifdef MOZ_WAVE
 		$(NULL)
 else
 _TEST_FILES += \
 		test_can_play_type_no_wave.html \
 		$(NULL)
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/smil/test/Makefile.in
+++ b/content/smil/test/Makefile.in
@@ -91,9 +91,9 @@ include $(topsrcdir)/config/rules.mk
 	  test_smilTimeEvents.xhtml \
 	  test_smilTiming.xhtml \
 	  test_smilTimingZeroIntervals.xhtml \
 	  test_smilUpdatedInterval.xhtml \
 	  test_smilXHR.xhtml \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/svg/content/test/Makefile.in
+++ b/content/svg/content/test/Makefile.in
@@ -101,9 +101,9 @@ include $(topsrcdir)/config/rules.mk
 		test_valueLeaks.xhtml \
 		viewport-helper.svg \
 		test_viewport.html \
 		zoom-helper.svg \
 		test_zoom.xhtml \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/xbl/test/Makefile.in
+++ b/content/xbl/test/Makefile.in
@@ -77,13 +77,13 @@ include $(topsrcdir)/config/rules.mk
 _CHROME_FILES = \
 		test_bug296375.xul \
 		test_bug378518.xul \
 		test_bug398135.xul \
 		test_bug398492.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/content/xml/document/test/Makefile.in
+++ b/content/xml/document/test/Makefile.in
@@ -53,9 +53,9 @@ include $(topsrcdir)/config/rules.mk
 		test_viewport.xhtml \
 		test_bug293347.html \
 		file_bug293347.xml \
 		file_bug293347xslt.xml \
 		test_bug691215.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/xslt/tests/mochitest/Makefile.in
+++ b/content/xslt/tests/mochitest/Makefile.in
@@ -55,9 +55,9 @@ include $(topsrcdir)/config/rules.mk
 		test_bug566629.html \
 		test_bug566629.xhtml \
 		test_bug603159.html \
 		test_bug667315.html \
 		test_exslt_regex.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/content/xul/content/test/Makefile.in
+++ b/content/xul/content/test/Makefile.in
@@ -51,12 +51,12 @@ include $(topsrcdir)/config/rules.mk
 _CHROME_FILES = \
 		test_bug330705-2.xul \
 		test_bug233643.xul \
  		test_bug398289.html \
  		398289-resource.xul \
  		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/content/xul/document/test/Makefile.in
+++ b/content/xul/document/test/Makefile.in
@@ -59,9 +59,9 @@ include $(topsrcdir)/config/rules.mk
 		test_bug497875.xul \
 		bug497875-iframe.xul \
 		test_bug335375.xul \
 		overlay1_bug335375.xul \
 		overlay2_bug335375.xul \
 		$(NULL)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/content/xul/templates/tests/chrome/Makefile.in
+++ b/content/xul/templates/tests/chrome/Makefile.in
@@ -261,9 +261,9 @@ include $(topsrcdir)/config/rules.mk
 		test_tmpl_regenerate.xul \
 		test_bug441785.xul \
 		bug441785-1.rdf \
 		bug441785-2.rdf \
 		test_sortservice.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/docshell/test/Makefile.in
+++ b/docshell/test/Makefile.in
@@ -127,9 +127,9 @@ include $(topsrcdir)/config/rules.mk
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 _TEST_FILES += \
 		test_bug511449.html \
 		file_bug511449.html \
 		$(NULL)
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/docshell/test/browser/Makefile.in
+++ b/docshell/test/browser/Makefile.in
@@ -63,9 +63,9 @@ include $(topsrcdir)/config/rules.mk
 		file_bug655270.html \
 		favicon_bug655270.ico \
 		browser_bug670318.js \
 		file_bug670318.html \
 		browser_bug673467.js \
 		$(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/docshell/test/chrome/Makefile.in
+++ b/docshell/test/chrome/Makefile.in
@@ -125,15 +125,15 @@ include $(topsrcdir)/config/rules.mk
 		$(NULL)
 
 _DOCSHELL_SUBHARNESS = \
     docshell_helpers.js \
     generic.html \
     $(NULL)
 
 libs:: $(_HTTP_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
 libs:: $(_DOCSHELL_SUBHARNESS)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/docshell/test/navigation/Makefile.in
+++ b/docshell/test/navigation/Makefile.in
@@ -89,14 +89,14 @@ ifneq (mobile,$(MOZ_BUILD_APP))
 		bug343515_pg3.html \
 		bug343515_pg3_1.html \
 		bug343515_pg3_2.html \
 		bug343515_pg3_1_1.html \
 		$(NULL)
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 ifneq (mobile,$(MOZ_BUILD_APP))
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 endif
--- a/dom/indexedDB/test/Makefile.in
+++ b/dom/indexedDB/test/Makefile.in
@@ -119,14 +119,14 @@ BROWSER_TEST_FILES = \
   browser_privateBrowsing.js \
   browser_quotaPrompt.html \
   browser_quotaPromptAllow.js \
   browser_quotaPromptDeny.js \
   head.js \
   $(NULL)
 
 libs:: $(BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 endif
 
 libs:: $(TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
--- a/dom/ipc/tests/Makefile.in
+++ b/dom/ipc/tests/Makefile.in
@@ -45,9 +45,9 @@ include $(topsrcdir)/config/rules.mk
 
 MOCHICHROME_FILES = \
   test_process_error.xul \
   process_error.xul \
   process_error_contentscript.js \
   $(NULL)
 
 libs:: $(MOCHICHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/dom/plugins/test/mochitest/Makefile.in
+++ b/dom/plugins/test/mochitest/Makefile.in
@@ -164,12 +164,12 @@ endif
 ifeq (gtk2,$(MOZ_WIDGET_TOOLKIT))
 _MOCHITEST_FILES += \
 		test_copyText.html \
 		test_crash_nested_loop.html \
 		$(NULL)
 endif
 
 libs:: $(_MOCHICHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
 libs:: $(_MOCHITEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/src/foo/Makefile.in
+++ b/dom/src/foo/Makefile.in
@@ -47,9 +47,9 @@ include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
   test_foo.html \
   $(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/src/json/test/Makefile.in
+++ b/dom/src/json/test/Makefile.in
@@ -48,10 +48,10 @@ MODULE         = json_test
 XPCSHELL_TESTS = unit
 
 include $(topsrcdir)/config/rules.mk
 
  _TEST_FILES =	test_json.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
--- a/dom/src/jsurl/test/Makefile.in
+++ b/dom/src/jsurl/test/Makefile.in
@@ -54,9 +54,9 @@ include $(topsrcdir)/config/rules.mk
 		load-stopping-1c.html \
 		load-stopping-1d.html \
 		test_bug351633-3.html \
 		test_bug351633-4.html \
 		test_bug384981.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/browser/Makefile.in
+++ b/dom/tests/browser/Makefile.in
@@ -53,9 +53,9 @@ include $(topsrcdir)/config/rules.mk
 		browser_ConsoleStorageAPITests.js \
 		browser_ConsoleStoragePBTest.js \
 		browser_autofocus_preference.js \
 		browser_popup_blocker_save_open_panel.js \
 		browser_bug396843.js \
 		$(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/jquery/Makefile.in
+++ b/dom/tests/mochitest/ajax/jquery/Makefile.in
@@ -51,9 +51,9 @@ DIRS	= \
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 	manifest.json \
 	test_jQuery.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/jquery/dist/Makefile.in
+++ b/dom/tests/mochitest/ajax/jquery/dist/Makefile.in
@@ -48,9 +48,9 @@ DIRS	= \
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 	jquery.js \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/jquery/test/Makefile.in
+++ b/dom/tests/mochitest/ajax/jquery/test/Makefile.in
@@ -53,9 +53,9 @@ include $(topsrcdir)/config/rules.mk
 _TEST_FILES	= \
 	index.html \
 	offset.html \
 	test.js \
 	fix.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/jquery/test/data/Makefile.in
+++ b/dom/tests/mochitest/ajax/jquery/test/data/Makefile.in
@@ -61,9 +61,9 @@ include $(topsrcdir)/config/rules.mk
 	test2.html \
 	test3.html \
 	testrunner.js \
 	testsuite.css \
 	with_fries.xml \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/jquery/test/data/offset/Makefile.in
+++ b/dom/tests/mochitest/ajax/jquery/test/data/offset/Makefile.in
@@ -53,9 +53,9 @@ include $(topsrcdir)/config/rules.mk
 	fixed.html \
 	relative.html \
 	scroll.html \
 	static.html \
 	table.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/jquery/test/unit/Makefile.in
+++ b/dom/tests/mochitest/ajax/jquery/test/unit/Makefile.in
@@ -54,9 +54,9 @@ include $(topsrcdir)/config/rules.mk
 	dimensions.js \
 	event.js \
 	fx.js \
 	offset.js \
 	selector.js \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/lib/Makefile.in
+++ b/dom/tests/mochitest/ajax/lib/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 		AJAX_setup.js \
 		test.css \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/mochikit/Makefile.in
+++ b/dom/tests/mochitest/ajax/mochikit/Makefile.in
@@ -51,9 +51,9 @@ DIRS	= \
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 	test_Mochikit.html \
 	manifest.json \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/mochikit/MochiKit/Makefile.in
+++ b/dom/tests/mochitest/ajax/mochikit/MochiKit/Makefile.in
@@ -65,9 +65,9 @@ include $(topsrcdir)/config/rules.mk
 		Sortable.js \
 		Style.js \
 		Test.js \
 		Visual.js \
 		__package__.js \
 		$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/mochikit/tests/Makefile.in
+++ b/dom/tests/mochitest/ajax/mochikit/tests/Makefile.in
@@ -76,9 +76,9 @@ include $(topsrcdir)/config/rules.mk
 		MochiKit-Selector.html \
 		MochiKit-Signal.html \
 		MochiKit-Style.html \
 		MochiKit-Visual.html \
 		test_Signal.js \
 		$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/mochikit/tests/SimpleTest/Makefile.in
+++ b/dom/tests/mochitest/ajax/mochikit/tests/SimpleTest/Makefile.in
@@ -49,9 +49,9 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 		SimpleTest.js \
 		TestRunner.js \
 		test.css \
 		$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/offline/Makefile.in
+++ b/dom/tests/mochitest/ajax/offline/Makefile.in
@@ -120,9 +120,9 @@ include $(topsrcdir)/config/rules.mk
 	offlineChild.html \
 	test_xhtmlManifest.xhtml \
 	test_missingManifest.html \
 	missing.html \
 	jupiter.jpg \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/offline/namespace1/Makefile.in
+++ b/dom/tests/mochitest/ajax/offline/namespace1/Makefile.in
@@ -49,9 +49,9 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
         opp.html \
         script.js \
         redirectToDifferentOrigin.sjs \
         $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/offline/namespace1/sub/Makefile.in
+++ b/dom/tests/mochitest/ajax/offline/namespace1/sub/Makefile.in
@@ -46,9 +46,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
         opp.html \
         script1.js \
         $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/offline/namespace1/sub2/Makefile.in
+++ b/dom/tests/mochitest/ajax/offline/namespace1/sub2/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
         script2.js \
         $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/offline/namespace2/Makefile.in
+++ b/dom/tests/mochitest/ajax/offline/namespace2/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
         script3.js \
         $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/Makefile.in
@@ -52,9 +52,9 @@ DIRS	= \
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
         test_Prototype.html \
         manifest.json \
         $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/dist/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/dist/Makefile.in
@@ -45,9 +45,9 @@ relativesrcdir	= dom/tests/mochitest/aja
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 	prototype.js \
         $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/test/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/test/Makefile.in
@@ -54,9 +54,9 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 		test.css \
 		browser.html \
 		console.html \
 		$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/test/functional/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/test/functional/Makefile.in
@@ -45,9 +45,9 @@ relativesrcdir	= dom/tests/mochitest/aja
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 	event.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/test/lib/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/test/lib/Makefile.in
@@ -46,9 +46,9 @@ include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 		unittest.js \
 		$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/test/unit/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/test/unit/Makefile.in
@@ -65,9 +65,9 @@ include $(topsrcdir)/config/rules.mk
 	position_test.js \
 	range_test.js \
 	selector_test.js \
 	string_test.js \
 	unittest_test.js \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/test/unit/fixtures/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/test/unit/fixtures/Makefile.in
@@ -69,9 +69,9 @@ include $(topsrcdir)/config/rules.mk
 	logo.gif \
 	position.html \
 	selector.html \
 	string.js \
 	unittest.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/prototype/test/unit/tmp/Makefile.in
+++ b/dom/tests/mochitest/ajax/prototype/test/unit/tmp/Makefile.in
@@ -59,9 +59,9 @@ include $(topsrcdir)/config/rules.mk
 	position_test.html \
 	range_test.html \
 	selector_test.html \
 	string_test.html \
 	unit_test.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/scriptaculous/Makefile.in
+++ b/dom/tests/mochitest/ajax/scriptaculous/Makefile.in
@@ -52,9 +52,9 @@ DIRS	= \
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 	manifest.json \
 	test_Scriptaculous.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/scriptaculous/lib/Makefile.in
+++ b/dom/tests/mochitest/ajax/scriptaculous/lib/Makefile.in
@@ -48,9 +48,9 @@ DIRS	= \
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 	prototype.js \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/scriptaculous/src/Makefile.in
+++ b/dom/tests/mochitest/ajax/scriptaculous/src/Makefile.in
@@ -55,9 +55,9 @@ include $(topsrcdir)/config/rules.mk
 	effects.js \
 	scriptaculous.js \
 	slider.js \
 	sound.js \
 	unittest.js \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/ajax/scriptaculous/test/unit/Makefile.in
+++ b/dom/tests/mochitest/ajax/scriptaculous/test/unit/Makefile.in
@@ -66,9 +66,9 @@ include $(topsrcdir)/config/rules.mk
 	position_clone_test.html \
 	slider_test.html \
 	sortable_test.html \
 	string_test.html \
 	unit_test.html \
 	$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/bugs/Makefile.in
+++ b/dom/tests/mochitest/bugs/Makefile.in
@@ -150,9 +150,9 @@ include $(topsrcdir)/config/rules.mk
 		test_resize_move_windows.html \
 		test_devicemotion_multiple_listeners.html \
 		devicemotion_outer.html \
 		devicemotion_inner.html \
 		test_bug698061.html \
 		$(NULL)
 
 libs:: 	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/chrome/Makefile.in
+++ b/dom/tests/mochitest/chrome/Makefile.in
@@ -77,9 +77,9 @@ include $(topsrcdir)/config/rules.mk
 ifeq (WINNT,$(OS_ARCH))
 _TEST_FILES += \
 		test_sizemode_attribute.xul \
 		sizemode_attribute.xul \
 		$(NULL)
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/dom/tests/mochitest/dom-level0/Makefile.in
+++ b/dom/tests/mochitest/dom-level0/Makefile.in
@@ -54,9 +54,9 @@ include $(topsrcdir)/config/rules.mk
 		file_location.html \
 		test_location.html \
 		test_innerWidthHeight_script.html \
 		innerWidthHeight_script.html \
 		test_location_setters.html \
 		$(NULL)
 
 libs:: 	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/dom-level1-core/Makefile.in
+++ b/dom/tests/mochitest/dom-level1-core/Makefile.in
@@ -599,27 +599,27 @@ include $(topsrcdir)/config/rules.mk
 		$(NULL)
 
 # test_PIsetdatanomodificationallowederrEE.html was originally
 # test_processinginstructionsetdatanomodificationallowederrEE.html, but that
 # name is too long for Windows little brain.
 
 # work around command-line length limits by splitting into groups
 libs:: 	$(_TEST_FILES_A)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_B)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_C)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_D)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_E)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_F)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_G)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/dom-level1-core/files/Makefile.in
+++ b/dom/tests/mochitest/dom-level1-core/files/Makefile.in
@@ -62,9 +62,9 @@ include $(topsrcdir)/config/rules.mk
 		staff.svg \
 		svgtest.js \
 		xhtml-lat1.ent \
 		xhtml-symbol.ent \
 		xhtml1-strict.dtd \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/dom-level2-core/Makefile.in
+++ b/dom/tests/mochitest/dom-level2-core/Makefile.in
@@ -325,24 +325,24 @@ include $(topsrcdir)/config/rules.mk
 		test_setNamedItemNS03.html \
 		test_setNamedItemNS04.html \
 		test_setNamedItemNS05.html \
 		test_systemId01.html \
 		$(NULL)
 
 # work around nsinstall limits on windows by splitting into groups
 libs:: 	$(_TEST_FILES_A)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_B)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_C)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: 	$(_TEST_FILES_D)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_E)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs::	$(_TEST_FILES_F)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/dom-level2-core/files/Makefile.in
+++ b/dom/tests/mochitest/dom-level2-core/files/Makefile.in
@@ -67,9 +67,9 @@ include $(topsrcdir)/config/rules.mk
 		xhtml-special.ent \
 		xhtml-symbol.ent \
 		xhtml1-frameset.dtd \
 		xhtml1-strict.dtd \
 		xhtml1-transitional.dtd \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/dom-level2-html/Makefile.in
+++ b/dom/tests/mochitest/dom-level2-html/Makefile.in
@@ -740,19 +740,19 @@ include $(topsrcdir)/config/rules.mk
 		test_HTMLAppletElement08.html \
 		test_HTMLAppletElement09.html \
 		test_HTMLAppletElement10.html \
 		test_HTMLAppletElement11.html \
 		$(NULL)
 
 # work around nsinstall limits on windows by splitting into groups
 libs:: 	$(_TEST_FILES_A)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs:: 	$(_TEST_FILES_B)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs:: 	$(_TEST_FILES_C)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs:: 	$(_TEST_FILES_D)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs:: 	$(_TEST_FILES_E)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 #libs:: 	$(_TEST_FILES_F)
-#	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+#	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/dom-level2-html/files/Makefile.in
+++ b/dom/tests/mochitest/dom-level2-html/files/Makefile.in
@@ -251,12 +251,12 @@ include $(topsrcdir)/config/rules.mk
 		xhtml1-frameset.dtd \
 		xhtml1-strict.dtd \
 		xhtml1-transitional.dtd \
 		$(NULL)
 _TEST_FILES_J   = \
 		applets/org/w3c/domts/DOMTSApplet.class \
 		$(NULL)
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs:: $(_TEST_FILES_J)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)/applets/org/w3c/domts
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/applets/org/w3c/domts
 
--- a/dom/tests/mochitest/general/Makefile.in
+++ b/dom/tests/mochitest/general/Makefile.in
@@ -74,12 +74,12 @@ include $(topsrcdir)/config/rules.mk
 
 _CHROME_FILES = \
 		test_innerScreen.xul \
 		test_offsets.xul \
 		test_offsets.js \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/dom/tests/mochitest/geolocation/Makefile.in
+++ b/dom/tests/mochitest/geolocation/Makefile.in
@@ -62,10 +62,10 @@ include $(topsrcdir)/config/rules.mk
 		test_worseAccuracyDoesNotBlockCallback.html \
 		geolocation.html \
 		geolocation_common.js  \
 		network_geolocation.sjs \
 		windowTest.html \
 		$(NULL)
 
 libs:: 	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
--- a/dom/tests/mochitest/globalstorage/Makefile.in
+++ b/dom/tests/mochitest/globalstorage/Makefile.in
@@ -46,9 +46,9 @@ include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 		test_bug614116.html \
 		iframe_bug614116-1.html \
 		iframe_bug614116-2.html \
 		$(NULL)
 
 libs:: 	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/localstorage/Makefile.in
+++ b/dom/tests/mochitest/localstorage/Makefile.in
@@ -90,11 +90,11 @@ include $(topsrcdir)/config/rules.mk
     test_storageConstructor.html \
     $(NULL)
     
 _CHROME_FILES = \
     test_localStorageFromChrome.xhtml \
     $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs::	$(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/dom/tests/mochitest/notification/Makefile.in
+++ b/dom/tests/mochitest/notification/Makefile.in
@@ -47,10 +47,10 @@ include $(topsrcdir)/config/rules.mk
 _TEST_FILES	= \
 		test_basic_notification.html \
 		test_basic_notification_click.html \
 		test_leak_windowClose.html \
 		notification_common.js \
 		$(NULL)
 
 libs:: 	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
--- a/dom/tests/mochitest/orientation/Makefile.in
+++ b/dom/tests/mochitest/orientation/Makefile.in
@@ -44,10 +44,10 @@ include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES	= \
 		test_bug507902.html \
 		$(NULL)
 
 libs:: 	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
--- a/dom/tests/mochitest/sessionstorage/Makefile.in
+++ b/dom/tests/mochitest/sessionstorage/Makefile.in
@@ -59,11 +59,11 @@ include $(topsrcdir)/config/rules.mk
     interOriginTest.js \
     $(NULL)
 
 _CHROME_FILES = \
     test_sessionStorageFromChrome.xhtml \
     $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs::	$(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/dom/tests/mochitest/storageevent/Makefile.in
+++ b/dom/tests/mochitest/storageevent/Makefile.in
@@ -63,9 +63,9 @@ include $(topsrcdir)/config/rules.mk
     test_storageLocalStorageEventCheckPropagation.html \
     test_storageSessionStorageEventCheckPropagation.html \
     test_storageSessionStorageEventCheckNoPropagation.html \
     interOriginFrame.js \
     interOriginTest2.js \
     $(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/dom/tests/mochitest/whatwg/Makefile.in
+++ b/dom/tests/mochitest/whatwg/Makefile.in
@@ -86,12 +86,12 @@ include $(topsrcdir)/config/rules.mk
 		postMessage_structured_clone_helper.html \
 		$(NULL)
 
 _CHROME_FILES	= \
 		test_postMessage_chrome.html \
 		$(NULL)		
 
 libs:: 	$(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/dom/workers/test/Makefile.in
+++ b/dom/workers/test/Makefile.in
@@ -160,15 +160,15 @@ ifneq ($(OS_ARCH),WINNT)
 _TEST_FILES += \
   test_closeOnGC.html \
   closeOnGC_worker.js \
   closeOnGC_server.sjs \
   $(NULL)
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_SUBDIR_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)/subdir
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/subdir
 
 libs:: $(_CHROME_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/dom/workers/test/extensions/bootstrap/Makefile.in
+++ b/dom/workers/test/extensions/bootstrap/Makefile.in
@@ -45,15 +45,15 @@ include $(DEPTH)/config/autoconf.mk
 XPI_NAME = workerbootstrap
 
 DIST_FILES = \
   bootstrap.js \
   install.rdf \
   worker.js \
   $(NULL)
 
-TEST_EXTENSIONS_DIR = $(DEPTH)/$(mochitestdir)/extensions
+TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	$(MKDIR) -p $(TEST_EXTENSIONS_DIR)
 	@(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - $(XPI_NAME)) | (cd $(TEST_EXTENSIONS_DIR) && tar -xf -)
--- a/dom/workers/test/extensions/traditional/Makefile.in
+++ b/dom/workers/test/extensions/traditional/Makefile.in
@@ -54,15 +54,15 @@ EXTRA_COMPONENTS = \
   WorkerTest.manifest \
   $(NULL)
 
 DIST_FILES = \
   install.rdf \
   worker.js \
   $(NULL)
 
-TEST_EXTENSIONS_DIR = $(DEPTH)/$(mochitestdir)/extensions
+TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	$(MKDIR) -p $(TEST_EXTENSIONS_DIR)
 	@(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - $(XPI_NAME)) | (cd $(TEST_EXTENSIONS_DIR) && tar -xf -)
--- a/editor/composer/test/Makefile.in
+++ b/editor/composer/test/Makefile.in
@@ -54,12 +54,12 @@ include $(topsrcdir)/config/rules.mk
 
 _CHROME_TEST_FILES = \
 		test_bug434998.xul \
 		test_bug338427.html \
 		test_bug678842.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/editor/libeditor/base/tests/Makefile.in
+++ b/editor/libeditor/base/tests/Makefile.in
@@ -54,13 +54,13 @@ include $(topsrcdir)/config/rules.mk
 
 _CHROME_TEST_FILES = \
 		test_selection_move_commands.xul \
                 test_bug46555.html \
 		test_bug646194.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/editor/libeditor/html/tests/Makefile.in
+++ b/editor/libeditor/html/tests/Makefile.in
@@ -116,17 +116,17 @@ endif
 		test_bug490879.xul \
 		test_bug607584.xul \
 		test_bug616590.xul \
 		test_bug635636.html \
 		green.png \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
-	(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - browserscope 2> /dev/null) | (cd $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir) && tar -xf -)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
+	(cd $(srcdir) && tar $(TAR_CREATE_FLAGS) - browserscope 2> /dev/null) | (cd $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir) && tar -xf -)
 
 libs:: $(_DATA_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)/data
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/data
 
 libs:: $(_CHROME_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/editor/libeditor/text/tests/Makefile.in
+++ b/editor/libeditor/text/tests/Makefile.in
@@ -76,13 +76,13 @@ ifneq ($(MOZ_WIDGET_TOOLKIT),gtk2)
 endif
 
 _CHROME_TEST_FILES = \
 		test_bug483651.html \
 		test_bug636465.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/embedding/test/Makefile.in
+++ b/embedding/test/Makefile.in
@@ -50,9 +50,9 @@ include $(topsrcdir)/config/rules.mk
 	test_bug449141.html \
 	bug449141_page.html \
 	test_bug499115.html \
 	test_nsFind.html \
 	test_window_open_units.html \
 	$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/extensions/cookie/test/Makefile.in
+++ b/extensions/cookie/test/Makefile.in
@@ -84,20 +84,20 @@ MODULE          = test_cookies
   file_loopback_inner.html \
   $(NULL)
 
 _BROWSER_TEST_FILES = \
   browser_test_favicon.js \
   $(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 XPCSHELL_TESTS = unit
 
 # FIXME/bug 575918: out-of-process xpcshell is broken on OS X
 ifneq ($(OS_ARCH),Darwin)
 XPCSHELL_TESTS += unit_ipc
 endif
 
--- a/extensions/spellcheck/tests/chrome/Makefile.in
+++ b/extensions/spellcheck/tests/chrome/Makefile.in
@@ -46,9 +46,9 @@ include $(DEPTH)/config/autoconf.mk
 DIRS = base map
 
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = 	test_add_remove_dictionaries.xul \
 				$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/extensions/spellcheck/tests/chrome/base/Makefile.in
+++ b/extensions/spellcheck/tests/chrome/base/Makefile.in
@@ -44,9 +44,9 @@ relativesrcdir  = extensions/spellcheck/
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = 	base_utf.dic \
 				base_utf.aff \
 				$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/extensions/spellcheck/tests/chrome/map/Makefile.in
+++ b/extensions/spellcheck/tests/chrome/map/Makefile.in
@@ -44,9 +44,9 @@ relativesrcdir  = extensions/spellcheck/
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = 	maputf.dic \
 				maputf.aff \
 				$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/extensions/universalchardet/tests/Makefile.in
+++ b/extensions/universalchardet/tests/Makefile.in
@@ -74,9 +74,9 @@ relativesrcdir = extensions/universalcha
 		test_bug631751le.html \
 		bug631751be_text.html \
 		test_bug631751be.html \
 		bug638318_text.html \
 		test_bug638318.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/gfx/tests/Makefile.in
+++ b/gfx/tests/Makefile.in
@@ -112,9 +112,9 @@ endif
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
 OS_LIBS		+= $(MOZ_PANGO_LIBS) $(XLIBS)
 CXXFLAGS	+= $(MOZ_PANGO_CFLAGS)
 endif
 
 
 libs:: $(_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") \
-	    $(DEPTH)/$(mochitestdir)/tests/gfx
+	    $(DEPTH)/_tests/testing/mochitest/tests/gfx
--- a/image/test/browser/Makefile.in
+++ b/image/test/browser/Makefile.in
@@ -49,10 +49,10 @@ include $(topsrcdir)/config/rules.mk
                  imageX2.html \
                  animated.gif \
                  animated2.gif \
 		 browser_bug666317.js \
 		 big.png \
                  $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
--- a/image/test/mochitest/Makefile.in
+++ b/image/test/mochitest/Makefile.in
@@ -93,12 +93,12 @@ include $(topsrcdir)/config/rules.mk
 # test_bug478398.html disabled - See bug 579139
 
 _CHROME_FILES = imgutils.js \
                 lime-anim-100x100.svg \
                 test_animSVGImage.html \
                 $(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/intl/uconv/tests/Makefile.in
+++ b/intl/uconv/tests/Makefile.in
@@ -68,11 +68,11 @@ relativesrcdir	= intl/uconv/tests
 		test_bug335816.html \
 		test_singlebyte_overconsumption.html \
 		test_unicode_noncharacterescapes.html \
 		test_unicode_noncharacters_gb18030.html \
 		test_unicode_noncharacters_utf8.html \
 		test_utf8_overconsumption.html \
 		$(NULL)
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 include $(topsrcdir)/config/rules.mk
--- a/js/jetpack/tests/Makefile.in
+++ b/js/jetpack/tests/Makefile.in
@@ -51,10 +51,10 @@ include $(topsrcdir)/config/config.mk
 include $(topsrcdir)/config/rules.mk
 
 ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT)) # Disabled for bug 599475
 MOCHICHROME_FILES = \
   test_jetpack_crash.xul \
   $(NULL)
 
 libs:: $(MOCHICHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 endif
--- a/js/jsd/test/Makefile.in
+++ b/js/jsd/test/Makefile.in
@@ -48,9 +48,9 @@ MODULE = jsdebug
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = 	test_bug507448.html bug507448.js \
 		test_bug617870-callhooks.html test-bug617870-callhooks.js jsd-test.js \
 		test_bug638178-execlines.html test-bug638178-execlines.js \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/js/src/config/config.mk
+++ b/js/src/config/config.mk
@@ -51,20 +51,16 @@ endif
 INCLUDED_CONFIG_MK = 1
 
 EXIT_ON_ERROR = set -e; # Shell loops continue past errors without this.
 
 ifndef topsrcdir
 topsrcdir	= $(DEPTH)
 endif
 
-ifndef mochitestdir
-mochitestdir	= _mochitest
-endif
-
 ifndef INCLUDED_AUTOCONF_MK
 include $(DEPTH)/config/autoconf.mk
 endif
 
 COMMA = ,
 
 # Sanity check some variables
 CHECK_VARS := \
--- a/js/xpconnect/tests/chrome/Makefile.in
+++ b/js/xpconnect/tests/chrome/Makefile.in
@@ -75,9 +75,9 @@ include $(topsrcdir)/config/rules.mk
 		test_getweakmapkeys.xul \
 		$(NULL)
 
 # Disabled until this test gets updated to test the new proxy based
 # wrappers.
 #		test_wrappers-2.xul \
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/js/xpconnect/tests/mochitest/Makefile.in
+++ b/js/xpconnect/tests/mochitest/Makefile.in
@@ -107,13 +107,13 @@ ifndef MOZ_PLATFORM_MAEMO
 		bug657267.jar
 endif
 endif
 
 
 		#test_bug484107.html \
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/layout/base/tests/Makefile.in
+++ b/layout/base/tests/Makefile.in
@@ -353,17 +353,17 @@ ifeq (,$(filter windows,$(MOZ_WIDGET_TOO
 		$(NULL)
 endif
 
 _BROWSER_FILES = \
 	browser_bug617076.js \
 	$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs:: $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 check::
 	@$(EXIT_ON_ERROR) \
 	  for f in $(subst .cpp,$(BIN_SUFFIX),$(BARE_UNIT_TESTS)); do \
 	    $(RUN_TEST_PROGRAM) $(DIST)/bin/$$f; \
 	  done
--- a/layout/base/tests/chrome/Makefile.in
+++ b/layout/base/tests/chrome/Makefile.in
@@ -66,9 +66,9 @@ include $(topsrcdir)/config/rules.mk
 	     printpreview_helper.xul \
 	test_printpreview_bug396024.xul \
 	     printpreview_bug396024_helper.xul \
 	test_printpreview_bug482976.xul \
 	     printpreview_bug482976_helper.xul \
     $(NULL)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/layout/forms/test/Makefile.in
+++ b/layout/forms/test/Makefile.in
@@ -82,12 +82,12 @@ include $(topsrcdir)/config/rules.mk
 _CHROME_FILES = \
 		test_bug536567.html \
 		     bug536567_subframe.html \
 		test_bug665540.html \
 		     bug665540_window.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/layout/generic/test/Makefile.in
+++ b/layout/generic/test/Makefile.in
@@ -134,12 +134,12 @@ include $(topsrcdir)/config/rules.mk
   test_bug469613.xul \
   test_bug469774.xul \
   test_backspace_delete.xul \
   test_bug514732-2.xul \
   file_bug514732_window.xul \
   $(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/layout/inspector/tests/Makefile.in
+++ b/layout/inspector/tests/Makefile.in
@@ -50,9 +50,9 @@ include $(topsrcdir)/config/rules.mk
 		test_bug522601.xhtml \
 		test_bug536379.html \
 		test_bug536379-2.html \
 		test_bug557726.html \
 		test_bug609549.xhtml \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/layout/inspector/tests/chrome/Makefile.in
+++ b/layout/inspector/tests/chrome/Makefile.in
@@ -48,9 +48,9 @@ include $(topsrcdir)/config/rules.mk
 		test_bug467669.xul \
 		test_bug467669.css \
 		test_bug695639.xul \
 		test_bug695639.css \
 		GentiumPlus-R.woff \
 		$(NULL)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/layout/reftests/fonts/Makefile.in
+++ b/layout/reftests/fonts/Makefile.in
@@ -42,9 +42,9 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =	Ahem.ttf \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/fonts
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/fonts
--- a/layout/reftests/fonts/mplus/Makefile.in
+++ b/layout/reftests/fonts/mplus/Makefile.in
@@ -42,9 +42,9 @@ VPATH		= @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =	mplus-1p-regular.ttf \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/fonts/mplus
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/fonts/mplus
--- a/layout/style/test/Makefile.in
+++ b/layout/style/test/Makefile.in
@@ -242,17 +242,17 @@ ifneq (mobile,$(MOZ_BUILD_APP))
 _BROWSER_FILES = \
 		browser_bug453896.js \
 		bug453896_iframe.html \
 		media_queries_iframe.html \
 		$(NULL)
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_VISITED_REFTEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)/css-visited/
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)/css-visited/
 
 ifneq (mobile,$(MOZ_BUILD_APP))
 libs:: $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 endif
--- a/layout/style/test/chrome/Makefile.in
+++ b/layout/style/test/chrome/Makefile.in
@@ -53,12 +53,12 @@ include $(topsrcdir)/config/rules.mk
     hover_helper.html \
     $(NULL)
 
 _TEST_FILES = \
     moz_document_helper.html \
     $(NULL)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/layout/tables/test/Makefile.in
+++ b/layout/tables/test/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		test_bug337124.html \
 		test_bug541668_table_event_delivery.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/layout/xul/base/test/Makefile.in
+++ b/layout/xul/base/test/Makefile.in
@@ -59,12 +59,12 @@ ifneq (mobile,$(MOZ_BUILD_APP))
 
 _CHROME_FILES +=	test_resizer.xul \
 		window_resizer.xul \
 		window_resizer_element.xul \
 		$(NULL)
 endif
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/layout/xul/test/Makefile.in
+++ b/layout/xul/test/Makefile.in
@@ -52,12 +52,12 @@ include $(topsrcdir)/config/rules.mk
 
 _CHROME_FILES = \
 		test_bug372685.xul \
 		test_bug398982-1.xul \
 		test_bug398982-2.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/mobile/chrome/tests/Makefile.in
+++ b/mobile/chrome/tests/Makefile.in
@@ -35,17 +35,17 @@
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH     = ../../..
 topsrcdir = @top_srcdir@
 srcdir    = @srcdir@
 VPATH     = @srcdir@
 relativesrcdir  = mobile/chrome/tests
-TESTXPI  = $(CURDIR)/$(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)/addons
+TESTXPI  = $(CURDIR)/$(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)/addons
 ADDONSRC = $(srcdir)/addons
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = \
   head.js \
   remote_autocomplete.js \
@@ -122,17 +122,17 @@ ifneq ($(OS_TARGET),Android)
   browser_navigation.js \
   $(NULL)
 ifndef MOZ_PLATFORM_MAEMO
 _BROWSER_FILES +=  browser_sidebars.js
 endif
 endif
 
 libs:: $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs::
 	rm -rf $(TESTXPI)
 	$(NSINSTALL) -D $(TESTXPI)
 	if [ -d $(ADDONSRC) ]; then \
 		$(EXIT_ON_ERROR) \
 		for dir in $(ADDONSRC)/*; do \
 			base=`basename $$dir` ; \
--- a/modules/libjar/test/chrome/Makefile.in
+++ b/modules/libjar/test/chrome/Makefile.in
@@ -49,9 +49,9 @@ include $(topsrcdir)/config/rules.mk
 		signed.zip             \
 		unsigned.zip           \
 		signed-badca.zip       \
 		signed-tampered.zip    \
 		signed-added.zip       \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/modules/libjar/test/mochitest/Makefile.in
+++ b/modules/libjar/test/mochitest/Makefile.in
@@ -47,9 +47,9 @@ include $(topsrcdir)/config/rules.mk
 _TEST_FILES = \
 		test_bug403331.html    \
 		bug403331.zip          \
 		bug403331.zip^headers^ \
 		openredirect.sjs       \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/netwerk/test/browser/Makefile.in
+++ b/netwerk/test/browser/Makefile.in
@@ -44,9 +44,9 @@ relativesrcdir  = netwerk/test/browser
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_TEST_FILES = \
 	                  browser_NetUtil.js \
 	                  $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/parser/htmlparser/tests/mochitest/Makefile.in
+++ b/parser/htmlparser/tests/mochitest/Makefile.in
@@ -98,9 +98,9 @@ include $(topsrcdir)/config/rules.mk
 #		test_bug568470.html \
 #		file_bug568470.sjs \
 #		file_bug568470-script.sjs \
 
 # Disable test due to frequent orange on Mac
 #		test_bug534293.html \
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/parser/htmlparser/tests/mochitest/dir_bug534293/Makefile.in
+++ b/parser/htmlparser/tests/mochitest/dir_bug534293/Makefile.in
@@ -43,9 +43,9 @@ relativesrcdir  = parser/htmlparser/test
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =	file_bug534293.sjs \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/parser/htmlparser/tests/mochitest/html5lib_tree_construction/Makefile.in
+++ b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/Makefile.in
@@ -90,9 +90,9 @@ include $(topsrcdir)/config/rules.mk
 		tests9.dat \
 		tests_innerHTML_1.dat \
 		tricky01.dat \
 		webkit01.dat \
 		webkit02.dat \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/parser/htmlparser/tests/mochitest/html5lib_tree_construction/scripted/Makefile.in
+++ b/parser/htmlparser/tests/mochitest/html5lib_tree_construction/scripted/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =	adoption01.dat \
 		webkit01.dat \
 		ark.dat \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/security/manager/ssl/tests/mochitest/bugs/Makefile.in
+++ b/security/manager/ssl/tests/mochitest/bugs/Makefile.in
@@ -53,11 +53,11 @@ include $(topsrcdir)/config/rules.mk
 
 _CHROME_FILES = \
         test_bug413909.html \
         test_bug480619.html \
         test_bug644006.html \
         $(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/security/manager/ssl/tests/mochitest/mixedcontent/Makefile.in
+++ b/security/manager/ssl/tests/mochitest/mixedcontent/Makefile.in
@@ -101,9 +101,9 @@ include $(topsrcdir)/config/rules.mk
         unsecurePictureDup.html \
         $(NULL)
 
 #        test_dynUnsecureRedirect.html \ intermitently fails, quit often, bug 487402
 #        test_unsecureIframeMetaRedirect.html \ also intermittently fails, less often, bug 487632
 
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/security/manager/ssl/tests/mochitest/stricttransportsecurity/Makefile.in
+++ b/security/manager/ssl/tests/mochitest/stricttransportsecurity/Makefile.in
@@ -52,9 +52,9 @@ include $(topsrcdir)/config/rules.mk
 	nosts_bootstrap.html \
 	nosts_bootstrap.html^headers^ \
 	verify.sjs \
 	test_stricttransportsecurity.html \
 	test_sts_privatebrowsing.html \
 	$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/testing/mochitest/Makefile.in
+++ b/testing/mochitest/Makefile.in
@@ -34,16 +34,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
+relativesrcdir  = testing/mochitest
 
 include $(DEPTH)/config/autoconf.mk
 
 DIRS = \
   MochiKit \
   static \
   dynamic \
   tests \
@@ -61,22 +62,22 @@ DIST_FILES = install.rdf
 USE_EXTENSION_MANIFEST = 1
 
 XPI_NAME = mochijar
 
 # we turn this off for UNIVERSAL_BINARY
 CHROME_JAR = 1
 
 include $(topsrcdir)/config/rules.mk
-# We're installing to _mochitest, so this is the depth
+# We're installing to _tests/testing/mochitest, so this is the depth
 # necessary for relative objdir paths.
-TARGET_DEPTH = ..
+TARGET_DEPTH = ../../..
 include $(topsrcdir)/build/automation-build.mk
 
-# files that get copied into $objdir/_mochitest/
+# files that get copied into $objdir/_tests/
 _SERV_FILES = 	\
 		runtests.py \
 		automation.py \
 		runtestsremote.py \
 		runtestsvmware.py \
 		$(topsrcdir)/build/mobile/devicemanager.py \
 		$(topsrcdir)/build/mobile/devicemanagerADB.py \
 		$(topsrcdir)/build/mobile/devicemanagerSUT.py \
@@ -122,17 +123,17 @@ include $(topsrcdir)/build/automation-bu
 _HANDSHAKE_FILES = \
 		pywebsocket/mod_pywebsocket/handshake/__init__.py \
 		pywebsocket/mod_pywebsocket/handshake/hybi00.py \
 		pywebsocket/mod_pywebsocket/handshake/_base.py \
 		pywebsocket/mod_pywebsocket/handshake/draft75.py \
 		pywebsocket/mod_pywebsocket/handshake/hybi06.py \
 		$(NULL)
 
-_DEST_DIR = $(DEPTH)/$(mochitestdir)
+_DEST_DIR = $(DEPTH)/_tests/$(relativesrcdir)
 
 libs:: 
 	(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - mochijar) | (cd $(_DEST_DIR) && tar -xf -)
 
 libs:: $(_PYWEBSOCKET_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(_DEST_DIR)/pywebsocket
 
 libs:: $(_MOD_PYWEBSOCKET_FILES)
@@ -193,29 +194,29 @@ endif
 PKG_STAGE = $(DIST)/test-package-stage
 DIST_BIN = $(DIST)/bin
 
 PKG_CHROMEJAR = $(PKG_STAGE)/mochitest/content/
 
 ifdef CHROME_JAR
 stage-chromejar:
 	$(NSINSTALL) -D $(PKG_CHROMEJAR)
-	cp -RL $(DEPTH)/$(mochitestdir)/browser $(PKG_CHROMEJAR)
-	cp -RL $(DEPTH)/$(mochitestdir)/chrome $(PKG_CHROMEJAR)
+	cp -RL $(DEPTH)/_tests/testing/mochitest/browser $(PKG_CHROMEJAR)
+	cp -RL $(DEPTH)/_tests/testing/mochitest/chrome $(PKG_CHROMEJAR)
 ifdef ACCESSIBILITY
-	cp -RL $(DEPTH)/$(mochitestdir)/a11y $(PKG_CHROMEJAR)
+	cp -RL $(DEPTH)/_tests/testing/mochitest/a11y $(PKG_CHROMEJAR)
 endif
 	@(cd $(PKG_STAGE)/mochitest && zip -r tests.jar content/)
 	@(rm -rf $(PKG_CHROMEJAR))
 
 stage-package: stage-chromejar
 endif
 
 $(_DEST_DIR):
 	$(NSINSTALL) -D $@
 
 stage-package:
 	$(NSINSTALL) -D $(PKG_STAGE)/mochitest && $(NSINSTALL) -D $(PKG_STAGE)/bin/plugins
-	@(cd $(DEPTH)/$(mochitestdir)/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/mochitest && tar -xf -)
+	@(cd $(DEPTH)/_tests/testing/mochitest/ && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/mochitest && tar -xf -)
 	@(cd $(DIST_BIN) && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_BINS)) | (cd $(PKG_STAGE)/bin && tar -xf -)
 	@(cd $(DIST_BIN)/components && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_COMPONENTS)) | (cd $(PKG_STAGE)/bin/components && tar -xf -)
 	@(cd $(topsrcdir)/build/pgo/certs && tar $(TAR_CREATE_FLAGS) - *) | (cd $(PKG_STAGE)/certs && tar -xf -)
 	@(cd $(DIST_BIN)/plugins && tar $(TAR_CREATE_FLAGS) - $(TEST_HARNESS_PLUGINS)) | (cd $(PKG_STAGE)/bin/plugins && tar -xf -)
--- a/testing/mochitest/MochiKit/Makefile.in
+++ b/testing/mochitest/MochiKit/Makefile.in
@@ -34,17 +34,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = MochiKit
+relativesrcdir  = testing/mochitest/MochiKit
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _JS_FILES =	Async.js \
 		Base.js \
 		Color.js \
 		Controls.js \
@@ -62,9 +62,9 @@ include $(topsrcdir)/config/rules.mk
 		Signal.js \
 		Sortable.js \
 		Style.js \
 		Test.js \
 		Visual.js \
 		$(NULL)	
 
 libs:: $(_JS_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
--- a/testing/mochitest/chrome/Makefile.in
+++ b/testing/mochitest/chrome/Makefile.in
@@ -34,23 +34,23 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = chrome
+relativesrcdir  = testing/mochitest/chrome
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _STATIC_FILES = test_sample.xul \
 		test_sanityChromeUtils.xul \
 		test_sanityPluginUtils.html \
 # Disabled until bug 652494 is resolved.
 #		test_sanityException.xul \
 #		test_sanityException2.xul \
 		$(NULL)
 
 libs:: $(_STATIC_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
--- a/testing/mochitest/dynamic/Makefile.in
+++ b/testing/mochitest/dynamic/Makefile.in
@@ -34,19 +34,19 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = dynamic
+relativesrcdir  = testing/mochitest/dynamic
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _STATIC_FILES = \
 	getMyDirectory.sjs \
 	$(NULL)
 
 libs:: $(_STATIC_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
--- a/testing/mochitest/runtests.py
+++ b/testing/mochitest/runtests.py
@@ -283,17 +283,17 @@ See <http://mochikit.com/doc/html/MochiK
     options.xrePath = mochitest.getFullPath(options.xrePath)
 
     options.profilePath = mochitest.getFullPath(options.profilePath)
 
     options.app = mochitest.getFullPath(options.app)
     if not os.path.exists(options.app):
       msg = """\
       Error: Path %(app)s doesn't exist.
-      Are you executing $objdir/_mochitest/runtests.py?"""
+      Are you executing $objdir/_tests/testing/mochitest/runtests.py?"""
       print msg % {"app": options.app}
       return None
 
     options.utilityPath = mochitest.getFullPath(options.utilityPath)
     options.certPath = mochitest.getFullPath(options.certPath)
     if options.symbolsPath and not isURL(options.symbolsPath):
       options.symbolsPath = mochitest.getFullPath(options.symbolsPath)
 
--- a/testing/mochitest/specialpowers/Makefile.in
+++ b/testing/mochitest/specialpowers/Makefile.in
@@ -34,17 +34,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH           = ../../..
 topsrcdir       = @top_srcdir@
 srcdir          = @srcdir@
 VPATH           = @srcdir@
-relativesrcdir  = specialpowers
+relativesrcdir  = testing/mochitest/specialpowers
 
 include $(DEPTH)/config/autoconf.mk
 
 NO_JS_MANIFEST = 1
 MOZ_CHROME_FILE_FORMAT = flat
 DIST_FILES = \
   install.rdf \
   chrome.manifest \
@@ -52,15 +52,15 @@ DIST_FILES = \
 
 EXTRA_COMPONENTS = components/SpecialPowersObserver.js
 
 XPI_NAME=specialpowers
 
 # Used in install.rdf
 USE_EXTENSION_MANIFEST=1
 
-TEST_EXTENSIONS_DIR = $(DEPTH)/${mochitestdir}/extensions
+TEST_EXTENSIONS_DIR = $(DEPTH)/_tests/testing/mochitest/extensions
 
 include $(topsrcdir)/config/rules.mk
 
 libs::
 	$(MKDIR) -p $(TEST_EXTENSIONS_DIR)
 	(cd $(DIST)/xpi-stage && tar $(TAR_CREATE_FLAGS) - $(XPI_NAME)) | (cd $(TEST_EXTENSIONS_DIR) && tar -xf -)
--- a/testing/mochitest/static/Makefile.in
+++ b/testing/mochitest/static/Makefile.in
@@ -34,21 +34,21 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = static
+relativesrcdir  = testing/mochitest/static
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _STATIC_FILES = test.template.txt \
 		xhtml.template.txt \
 		xul.template.txt \
 		harness.css \
 		$(NULL)
 
 libs:: $(_STATIC_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
--- a/testing/mochitest/tests/Makefile.in
+++ b/testing/mochitest/tests/Makefile.in
@@ -35,17 +35,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = tests
+relativesrcdir  = testing/mochitest/tests
 
 include $(DEPTH)/config/autoconf.mk
 
 PARALLEL_DIRS = \
 	MochiKit-1.4.2 \
 	SimpleTest \
 	browser \
 	$(NULL)
@@ -66,9 +66,9 @@ ifneq ($(OS_TARGET),Android)
 # Disabled on Android for permaorange, see bug 688052
   _TEST_FILES += \
   test_sanityEventUtils.html \
   test_sanitySimpletest.html
 endif
 # Copy the sanity tests into a subdirectory, so the top level is all dirs
 # in the test screen.
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)/Harness_sanity
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)/Harness_sanity
--- a/testing/mochitest/tests/MochiKit-1.4.2/MochiKit/Makefile.in
+++ b/testing/mochitest/tests/MochiKit-1.4.2/MochiKit/Makefile.in
@@ -35,17 +35,17 @@
 #
 # ***** END LICENSE BLOCK *****
 
 
 DEPTH		= ../../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = tests/MochiKit-1.4.2/MochiKit
+relativesrcdir  = testing/mochitest/tests/MochiKit-1.4.2/MochiKit
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _MOCHIKIT_FILES = \
 	Async.js \
 	Base.js \
 	Color.js \
@@ -63,9 +63,9 @@ include $(topsrcdir)/config/rules.mk
 	Signal.js \
 	Sortable.js \
 	Style.js \
 	Test.js \
 	Visual.js \
 	$(NULL)
 
 libs:: $(_MOCHIKIT_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
--- a/testing/mochitest/tests/MochiKit-1.4.2/tests/Makefile.in
+++ b/testing/mochitest/tests/MochiKit-1.4.2/tests/Makefile.in
@@ -35,17 +35,17 @@
 #
 # ***** END LICENSE BLOCK *****
 
 
 DEPTH		= ../../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = tests/MochiKit-1.4.2/tests
+relativesrcdir  = testing/mochitest/tests/MochiKit-1.4.2/tests
 
 include $(DEPTH)/config/autoconf.mk
 
 PARALLEL_DIRS = \
 	SimpleTest \
 	$(NULL)
 
 include $(topsrcdir)/config/rules.mk
@@ -77,9 +77,9 @@ include $(topsrcdir)/config/rules.mk
 	test_Signal.js \
 	$(NULL)
 
 # This test is broken: "Error: JSAN is not defined ... Line: 10".
 # (And is removed in future MochiKit v1.5)
 #	test_MochiKit-JSAN.html \
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
--- a/testing/mochitest/tests/MochiKit-1.4.2/tests/SimpleTest/Makefile.in
+++ b/testing/mochitest/tests/MochiKit-1.4.2/tests/SimpleTest/Makefile.in
@@ -39,19 +39,19 @@
 #
 # We want to run the tests in our own (modified) harness.
 #
 
 DEPTH		= ../../../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = tests/MochiKit-1.4.2/tests/SimpleTest
+relativesrcdir  = testing/mochitest/tests/MochiKit-1.4.2/tests/SimpleTest
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _STUBS_FILES = \
 	test.css \
 	$(NULL)
 
 libs:: $(_STUBS_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
--- a/testing/mochitest/tests/SimpleTest/Makefile.in
+++ b/testing/mochitest/tests/SimpleTest/Makefile.in
@@ -33,17 +33,17 @@
 # the provisions above, a recipient may use your version of this file under
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 DEPTH		= ../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = tests/SimpleTest
+relativesrcdir  = testing/mochitest/tests/SimpleTest
 include $(DEPTH)/config/autoconf.mk
 
 include $(topsrcdir)/config/rules.mk
 _SIMPLETEST_FILES =	MozillaLogger.js \
 			LogController.js \
 			SimpleTest.js \
 			test.css \
 			TestRunner.js \
@@ -53,10 +53,10 @@ include $(topsrcdir)/config/rules.mk
 			WindowSnapshot.js \
 			specialpowersAPI.js \
 			SpecialPowersObserverAPI.js \
 			$(DEPTH)/toolkit/content/tests/browser/common/mockObjects.js \
                         $(DEPTH)/docshell/test/chrome/docshell_helpers.js \
 			$(NULL)
 
 libs:: $(_SIMPLETEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/$(relativesrcdir)
 
--- a/testing/mochitest/tests/browser/Makefile.in
+++ b/testing/mochitest/tests/browser/Makefile.in
@@ -34,17 +34,17 @@
 # the terms of any one of the MPL, the GPL or the LGPL.
 #
 # ***** END LICENSE BLOCK *****
 
 DEPTH		= ../../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
-relativesrcdir  = tests/browser
+relativesrcdir  = testing/mochitest/tests/browser
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_TEST_FILES = \
 	                  head.js \
 	                  browser_head.js \
 	                  browser_pass.js \
@@ -63,9 +63,9 @@ include $(topsrcdir)/config/rules.mk
 #	                  browser_fail_pf.js \
 #	                  browser_fail_throw.js \
 #	                  browser_fail_timeout.js \
 # Disabled because it would take too long, useful to check functionality though.
 #	                  browser_requestLongerTimeout.js \
 	                  $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -52,23 +52,23 @@ include $(topsrcdir)/build/binary-locati
 SYMBOLS_PATH := --symbols-path=$(DIST)/crashreporter-symbols
 
 # Usage: |make [TEST_PATH=...] [EXTRA_TEST_ARGS=...] mochitest*|.
 MOCHITESTS := mochitest-plain mochitest-chrome mochitest-a11y mochitest-ipcplugins
 mochitest:: $(MOCHITESTS)
 
 RUN_MOCHITEST = \
 	rm -f ./$@.log && \
-	$(PYTHON) $(mochitestdir)/runtests.py --autorun --close-when-done \
+	$(PYTHON) _tests/testing/mochitest/runtests.py --autorun --close-when-done \
 	  --console-level=INFO --log-file=./$@.log --file-level=INFO \
 	  $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
 
 RUN_MOCHITEST_REMOTE = \
 	rm -f ./$@.log && \
-	$(PYTHON) $(mochitestdir)/runtestsremote.py --autorun --close-when-done \
+	$(PYTHON) _tests/testing/mochitest/runtestsremote.py --autorun --close-when-done \
 	  --console-level=INFO --log-file=./$@.log --file-level=INFO $(DM_FLAGS) --dm_trans=$(DM_TRANS) \
 	  --app=$(ANDROID_PACKAGE_NAME) --deviceIP=${TEST_DEVICE} --xre-path=${MOZ_HOST_BIN} \
 	  $(SYMBOLS_PATH) $(TEST_PATH_ARG) $(EXTRA_TEST_ARGS)
 
 ifndef NO_FAIL_ON_TEST_ERRORS
 define CHECK_TEST_ERROR
   @errors=`grep "TEST-UNEXPECTED-" $@.log` ;\
   if test "$$errors" ; then \
--- a/toolkit/components/aboutmemory/tests/chrome/Makefile.in
+++ b/toolkit/components/aboutmemory/tests/chrome/Makefile.in
@@ -45,10 +45,10 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _CHROME_FILES	= \
 		test_aboutmemory.xul \
 		test_asyncClose_leak.xul \
 		$(NULL)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/toolkit/components/alerts/test/Makefile.in
+++ b/toolkit/components/alerts/test/Makefile.in
@@ -50,9 +50,9 @@ MOCHI_TESTS = \
 		test_alerts.html \
 		test_alerts_noobserve.html \
 		$(NULL)
 
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(MOCHI_TESTS)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/components/ctypes/tests/Makefile.in
+++ b/toolkit/components/ctypes/tests/Makefile.in
@@ -70,26 +70,26 @@ XPCSHELL_TESTS = unit
   test_ctypes.xul \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 xpctestdir = $(testxpcobjdir)/$(relativesrcdir)/unit
 
 chrometestdir = \
-  $(DEPTH)/$(mochitestdir)/chrome/toolkit/components/$(relativesrcdir)
+  $(DEPTH)/_tests/testing/mochitest/chrome/toolkit/components/$(relativesrcdir)
 
 # preprocess and install our unit test into the appropriate directory,
 # and install the test library as well. the xpcshell test rules will
 # install the .js.in from the tests srcdir, so remove it when we're done.
 libs:: unit/test_jsctypes.js.in
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py $(DEFINES) $(ACDEFINES) \
 	  $^ > $(xpctestdir)/test_jsctypes.js
 	$(INSTALL) $(SHARED_LIBRARY) $(xpctestdir)
-	$(INSTALL) $(SHARED_LIBRARY) $(DEPTH)/$(mochitestdir)/chrome/libraries
+	$(INSTALL) $(SHARED_LIBRARY) $(DEPTH)/_tests/testing/mochitest/chrome/libraries
 	$(INSTALL) $(xpctestdir)/test_jsctypes.js $(chrometestdir)
 	$(INSTALL) $(xpctestdir)/$(SHARED_LIBRARY) $(chrometestdir)
 	$(RM) $(xpctestdir)/test_jsctypes.js.in
 
 libs:: $(_CHROME_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(chrometestdir)
 
 GARBAGE += \
--- a/toolkit/components/downloads/test/browser/Makefile.in
+++ b/toolkit/components/downloads/test/browser/Makefile.in
@@ -45,9 +45,9 @@ relativesrcdir = toolkit/components/down
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = \
   browser_nsIDownloadManagerUI.js \
   $(NULL)
 
 libs:: $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/toolkit/components/feeds/test/Makefile.in
+++ b/toolkit/components/feeds/test/Makefile.in
@@ -44,9 +44,9 @@ relativesrcdir  = toolkit/components/fee
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = \
 		test_bug675492.xul    \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/toolkit/components/microformats/tests/Makefile.in
+++ b/toolkit/components/microformats/tests/Makefile.in
@@ -53,9 +53,9 @@ include $(topsrcdir)/config/rules.mk
 		test_Microformats_getters.html \
 		test_Microformats_negative.html \
 		test_Microformats_add.html \
 		test_framerecursion.html \
 		geo.html \
 		$(NULL)
 
 libs::	$(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/toolkit/components/microformats/tests
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/toolkit/components/microformats/tests
--- a/toolkit/components/passwordmgr/test/Makefile.in
+++ b/toolkit/components/passwordmgr/test/Makefile.in
@@ -128,9 +128,9 @@ endif
 
 # This test doesn't pass because we can't ensure a cross-platform
 # event that occurs between DOMContentLoaded and Pageload
 # test_bug_221634.html
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(MOCHI_TESTS) $(MOCHI_CONTENT)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/components/passwordmgr/test/browser/Makefile.in
+++ b/toolkit/components/passwordmgr/test/browser/Makefile.in
@@ -47,9 +47,9 @@ include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = \
   browser_passwordmgrdlg.js \
   browser_passwordmgr_sort.js \
   browser_passwordmgrcopypwd.js \
   $(NULL)
 
 libs:: $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/toolkit/components/perf/Makefile.in
+++ b/toolkit/components/perf/Makefile.in
@@ -60,17 +60,17 @@ CPPSRCS = \
     $(NULL)
 
 ifdef ENABLE_TESTS
 _CHROME_TEST_FILES = \
     test_pm.xul \
     $(NULL)
 
 chrometestdir = \
-  $(DEPTH)/$(mochitestdir)/chrome/toolkit/components/$(MODULE)
+  $(DEPTH)/_tests/testing/mochitest/chrome/toolkit/components/$(MODULE)
 endif
 
 include $(topsrcdir)/config/rules.mk
 
 ifdef ENABLE_TESTS
 libs:: $(_CHROME_TEST_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(chrometestdir)
 endif
--- a/toolkit/components/places/tests/Makefile.in
+++ b/toolkit/components/places/tests/Makefile.in
@@ -79,12 +79,12 @@ endif
 
 TOOL_DIRS = \
   cpp \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(MOCHI_TESTS)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(XPCSHELL_TESTS_COMMON)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/xpcshell/$(relativesrcdir)
--- a/toolkit/components/places/tests/browser/Makefile.in
+++ b/toolkit/components/places/tests/browser/Makefile.in
@@ -68,12 +68,12 @@ include $(topsrcdir)/config/rules.mk
 	visituri/redirect_twice.sjs \
 	visituri/redirect_once.sjs \
 	visituri/final.html \
 	settitle/title1.html \
 	settitle/title2.html \
 	$(NULL)
 
 libs:: $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs:: $(_HTTP_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/components/places/tests/chrome/Makefile.in
+++ b/toolkit/components/places/tests/chrome/Makefile.in
@@ -59,13 +59,13 @@ include $(topsrcdir)/config/rules.mk
 		test_342484.xul \
 		test_341972a.xul \
 		test_favicon_annotations.xul \
 		test_303567.xul \
 		test_381357.xul \
 		$(NULL)
 
 libs:: $(_HTTP_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/toolkit/components/places/tests/mochitest/bug_411966/Makefile.in
+++ b/toolkit/components/places/tests/mochitest/bug_411966/Makefile.in
@@ -51,9 +51,9 @@ include $(topsrcdir)/config/rules.mk
 		ClickedPage.htm \
 		ClickedPage.htm^headers^ \
 		TempRedirectPage.htm \
 		TempRedirectPage.htm^headers^ \
 		PermRedirectPage.htm \
 		$(NULL)
 
 libs:: $(_HTTP_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/components/places/tests/mochitest/bug_461710/Makefile.in
+++ b/toolkit/components/places/tests/mochitest/bug_461710/Makefile.in
@@ -48,9 +48,9 @@ include $(topsrcdir)/config/rules.mk
 _HTTP_FILES	= \
 		visited_page.html \
 		link_page.html \
 		link_page-2.html \
 		link_page-3.html \
 		$(NULL)
 
 libs:: $(_HTTP_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/components/prompts/test/Makefile.in
+++ b/toolkit/components/prompts/test/Makefile.in
@@ -59,9 +59,9 @@ MOCHI_CONTENT = \
     prompt_common.js \
     bug619644_inner.html \
     bug625187_iframe.html \
     $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(MOCHI_TESTS) $(MOCHI_CONTENT)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/components/satchel/test/Makefile.in
+++ b/toolkit/components/satchel/test/Makefile.in
@@ -64,10 +64,10 @@ MOCHI_CONTENT = \
 		satchel_common.js \
 		subtst_form_submission_1.html \
 		subtst_privbrowsing.html \
 		$(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(MOCHI_TESTS) $(MOCHI_CONTENT)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
--- a/toolkit/components/startup/tests/browser/Makefile.in
+++ b/toolkit/components/startup/tests/browser/Makefile.in
@@ -46,9 +46,9 @@ include $(topsrcdir)/config/rules.mk
 
 _BROWSER_FILES = \
 	browser_bug511456.js \
 	browser_bug537449.js \
 	beforeunload.html \
 	$(NULL)
 
 libs:: $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/toolkit/components/url-classifier/tests/mochitest/Makefile.in
+++ b/toolkit/components/url-classifier/tests/mochitest/Makefile.in
@@ -53,9 +53,9 @@ include $(topsrcdir)/config/rules.mk
 		cleanWorker.js \
 		evil.js \
 		evilWorker.js \
 		evil.css \
 		import.css \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/components/viewsource/test/Makefile.in
+++ b/toolkit/components/viewsource/test/Makefile.in
@@ -45,9 +45,9 @@ relativesrcdir  = toolkit/components/vie
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _CHROME_FILES   = \
                 test_428653.xul \
                 $(NULL)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/toolkit/content/tests/browser/Makefile.in
+++ b/toolkit/content/tests/browser/Makefile.in
@@ -55,9 +55,9 @@ include $(topsrcdir)/config/rules.mk
   browser_bug295977_autoscroll_overflow.js \
   browser_bug594509.js \
   browser_Geometry.js \
   browser_save_resend_postdata.js \
   browser_Services.js \
   $(NULL)
 
 libs:: $(_BROWSER_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/toolkit/content/tests/browser/common/Makefile.in
+++ b/toolkit/content/tests/browser/common/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _COMMON_FILES = \
   mockObjects.js \
   mockTransfer.js \
   $(NULL)
 
 libs:: $(_COMMON_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/toolkit/content/tests/browser/data/Makefile.in
+++ b/toolkit/content/tests/browser/data/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _DATA_FILES = \
   post_form_inner.sjs \
   post_form_outer.sjs \
   $(NULL)
 
 libs:: $(_DATA_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/toolkit/content/tests/chrome/Makefile.in
+++ b/toolkit/content/tests/chrome/Makefile.in
@@ -198,9 +198,9 @@ endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),windows)
 _TEST_FILES += 	$(warning test_cursorsnap.xul temporarily disabled) \
 		window_cursorsnap_dialog.xul \
 		window_cursorsnap_wizard.xul
 endif
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/toolkit/content/tests/chrome/rtlchrome/Makefile.in
+++ b/toolkit/content/tests/chrome/rtlchrome/Makefile.in
@@ -40,11 +40,11 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = toolkit/content/tests/chrome/rtlchrome
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 libs:: rtl.manifest rtl.css rtl.dtd
-	$(INSTALL) @srcdir@/rtl.manifest $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/
-	$(INSTALL) @srcdir@/rtl.css $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/
-	$(INSTALL) @srcdir@/rtl.dtd $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/
+	$(INSTALL) @srcdir@/rtl.manifest $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/
+	$(INSTALL) @srcdir@/rtl.css $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/
+	$(INSTALL) @srcdir@/rtl.dtd $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/
--- a/toolkit/content/tests/chrome/rtltest/Makefile.in
+++ b/toolkit/content/tests/chrome/rtltest/Makefile.in
@@ -40,10 +40,10 @@ topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = toolkit/content/tests/chrome/rtltest
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 libs:: righttoleft.manifest dirtest.xul
-	$(INSTALL) @srcdir@/righttoleft.manifest $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/
-	$(INSTALL) @srcdir@/dirtest.xul $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/content/
+	$(INSTALL) @srcdir@/righttoleft.manifest $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/
+	$(INSTALL) @srcdir@/dirtest.xul $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/content/
--- a/toolkit/content/tests/widgets/Makefile.in
+++ b/toolkit/content/tests/widgets/Makefile.in
@@ -82,16 +82,16 @@ include $(topsrcdir)/config/rules.mk
 		$(NULL)
 
 ifneq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 _TEST_FILES += test_menubar.xul \
                window_menubar.xul
 endif
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/../chrome
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/../chrome
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
 libs:: $(_CHROME_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/toolkit/crashreporter/test/Makefile.in
+++ b/toolkit/crashreporter/test/Makefile.in
@@ -85,15 +85,15 @@ ifneq (mobile,$(MOZ_BUILD_APP))
   browser/head.js \
   browser/crashreport.sjs \
   browser/browser_aboutCrashes.js \
   browser/browser_bug471404.js \
   browser/browser_aboutCrashesResubmit.js \
   $(NULL)
 
 libs::  $(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)/browser
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)/browser
 endif
 
 libs:: $(SHARED_LIBRARY) $(EXTRA_JS_MODULES)
 	$(INSTALL) $^ $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit/
 	$(INSTALL) $^ $(DEPTH)/_tests/xpcshell/$(relativesrcdir)/unit_ipc/
 
--- a/toolkit/mozapps/downloads/tests/chrome/Makefile.in
+++ b/toolkit/mozapps/downloads/tests/chrome/Makefile.in
@@ -86,9 +86,9 @@ endif
 ifeq ($(OS_ARCH),WINNT)
 _CHROME_FILES += \
   test_taskbarprogress_downloadstates.xul \
   test_taskbarprogress_service.xul \
   $(NULL)
 endif
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/toolkit/mozapps/extensions/test/browser/Makefile.in
+++ b/toolkit/mozapps/extensions/test/browser/Makefile.in
@@ -36,17 +36,17 @@
 # ***** END LICENSE BLOCK *****
 
 DEPTH = ../../../../..
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 relativesrcdir  = toolkit/mozapps/extensions/test/browser
 ADDONSRC = $(srcdir)/addons
-TESTXPI = $(CURDIR)/$(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)/addons
+TESTXPI = $(CURDIR)/$(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)/addons
 
 include $(DEPTH)/config/autoconf.mk
 
 _MAIN_TEST_FILES = \
   head.js \
   browser_about.js \
   browser_bug523784.js \
   browser_bug557943.js \
@@ -128,24 +128,24 @@ include $(DEPTH)/config/autoconf.mk
   options.xul \
   redirect.sjs \
   releaseNotes.xhtml \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(_MAIN_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)-window
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)-window
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs:: $(_TEST_RESOURCES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 
 libs::
 	rm -rf $(TESTXPI)
 	$(NSINSTALL) -D $(TESTXPI)
 	if [ -d $(ADDONSRC) ]; then \
 		$(EXIT_ON_ERROR) \
 		for dir in $(ADDONSRC)/*; do \
 			base=`basename $$dir` ; \
--- a/toolkit/mozapps/extensions/test/mochitest/Makefile.in
+++ b/toolkit/mozapps/extensions/test/mochitest/Makefile.in
@@ -43,9 +43,9 @@ relativesrcdir  = toolkit/mozapps/extens
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES =	test_bug609794.html \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/mozapps/extensions/test/xpinstall/Makefile.in
+++ b/toolkit/mozapps/extensions/test/xpinstall/Makefile.in
@@ -125,9 +125,9 @@ include $(topsrcdir)/config/rules.mk
                  hashRedirect.sjs \
                  bug540558.html \
                  bug638292.html \
                  bug645699.html \
                  redirect.sjs \
                  $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
--- a/toolkit/mozapps/plugins/tests/Makefile.in
+++ b/toolkit/mozapps/plugins/tests/Makefile.in
@@ -39,17 +39,17 @@ DEPTH = ../../../..
 topsrcdir = @top_srcdir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
 include $(DEPTH)/config/autoconf.mk
 
 MODULE = test_plugins
 relativesrcdir  = toolkit/mozapps/plugins/tests
-TESTROOT = $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+TESTROOT = $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 USE_STATIC_LIBS = 1
 
 ifneq (mobile,$(MOZ_BUILD_APP))
 _BROWSER_FILES = \
   browser_bug435788.js \
   pfs_bug435788_1.rdf \
   pfs_bug435788_2.rdf \
   GoodExtension.xpi \
--- a/toolkit/mozapps/shared/test/chrome/Makefile.in
+++ b/toolkit/mozapps/shared/test/chrome/Makefile.in
@@ -45,9 +45,9 @@ include $(DEPTH)/config/autoconf.mk
 
 _CHROME_FILES = \
   test_bug544442_checkCert.xul \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/toolkit/mozapps/update/test/chrome/Makefile.in
+++ b/toolkit/mozapps/update/test/chrome/Makefile.in
@@ -104,18 +104,18 @@ include $(DEPTH)/config/autoconf.mk
   test_0900_deprecatedUpdateFormat_minor.xul \
   test_0901_deprecatedUpdateFormat_major.xul \
   test_9999_cleanup.xul \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(_OTHER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
 libs:: 
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) $(srcdir)/utils.js > \
-    $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/utils.js
+    $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/utils.js
 	$(PYTHON) $(MOZILLA_DIR)/config/Preprocessor.py -Fsubstitution $(DEFINES) $(ACDEFINES) $(srcdir)/update.sjs > \
-    $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)/update.sjs
+    $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)/update.sjs
--- a/toolkit/profile/test/Makefile.in
+++ b/toolkit/profile/test/Makefile.in
@@ -44,11 +44,11 @@ relativesrcdir = toolkit/profile/test
 
 include $(DEPTH)/config/autoconf.mk
 
 _CHROME_FILES   = \
                 test_create_profile.xul \
                 $(NULL)
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
 include $(topsrcdir)/config/rules.mk
--- a/toolkit/themes/pinstripe/mochitests/Makefile.in
+++ b/toolkit/themes/pinstripe/mochitests/Makefile.in
@@ -43,9 +43,9 @@ relativesrcdir  = toolkit/themes/pinstri
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _TEST_FILES = 	test_bug510426.xul \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/toolkit/xre/test/Makefile.in
+++ b/toolkit/xre/test/Makefile.in
@@ -50,9 +50,9 @@ endif
 
 MOCHITEST_FILES = \
   test_fpuhandler.html \
   $(NULL)
 
 include $(topsrcdir)/config/rules.mk
 
 libs:: $(MOCHITEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/uriloader/exthandler/tests/mochitest/Makefile.in
+++ b/uriloader/exthandler/tests/mochitest/Makefile.in
@@ -48,9 +48,9 @@ include $(topsrcdir)/config/rules.mk
 		test_handlerApps.xhtml \
 		test_unsafeBidiChars.xhtml \
 		handlerApps.js \
 		handlerApp.xhtml \
 		unsafeBidiFileName.sjs \
 		$(NULL)
 
 libs:: $(_TEST_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
--- a/widget/tests/Makefile.in
+++ b/widget/tests/Makefile.in
@@ -130,13 +130,13 @@ endif
 ifeq ($(MOZ_WIDGET_TOOLKIT),gtk2)
 _TEST_FILES += 	plugin_scroll_invalidation.html \
 		test_plugin_scroll_invalidation.html \
 		$(NULL)
 endif
 
 ifdef _TEST_FILES
 libs:: $(_TEST_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/tests/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 endif
 
 libs:: $(_CHROME_FILES)
-	$(INSTALL) $^ $(DEPTH)/$(mochitestdir)/chrome/$(relativesrcdir)
+	$(INSTALL) $^ $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
--- a/xpinstall/tests/Makefile.in
+++ b/xpinstall/tests/Makefile.in
@@ -99,10 +99,10 @@ ifneq (mobile,$(MOZ_BUILD_APP))
                  startsoftwareupdate.html \
                  installchrome.html \
                  authRedirect.sjs \
                  cookieRedirect.sjs \
                  bug540558.html \
                  $(NULL)
 
 libs::	$(_BROWSER_FILES)
-	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/$(mochitestdir)/browser/$(relativesrcdir)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
 endif