--- a/browser/components/preferences/tests/Makefile.in
+++ b/browser/components/preferences/tests/Makefile.in
@@ -19,11 +19,18 @@
     browser_chunk_permissions.js \
     browser_privacypane_1.js \
     browser_privacypane_3.js \
-    browser_privacypane_4.js \
     browser_privacypane_5.js \
     browser_privacypane_8.js \
     privacypane_tests_perwindow.js \
     $(NULL)
+
+ifdef ENABLE_TESTS
+pp_mochitest_browser_files := \
+    browser_privacypane_4.js \
+    $(NULL)
+pp_mochitest_browser_files_PATH := $(DEPTH)/_tests/testing/mochitest/browser/$(relativesrcdir)
+PP_TARGETS += pp_mochitest_browser_files
+endif # ENABLE_TESTS
 
 ifdef MOZ_SERVICES_HEALTHREPORT
 MOCHITEST_BROWSER_FILES += browser_healthreport.js