Bug 1201243 - Make browser/components/preferences/in-content top-level and move dialogs to a subdirectory. r=jaws
authorTim Nguyen <ntim.bugs@gmail.com>
Wed, 22 Apr 2020 23:35:08 +0000
changeset 589012 a1739b0379ce940edebe8622c76f174b93062261
parent 589011 15f28d419ea6ee19c8e3a8f6f2cd7017ef42c4c5
child 589013 3b3fd54478388e8b849fd9d7b8cd364cf9eb4c0c
push id13072
push userffxbld-merge
push dateMon, 04 May 2020 14:22:08 +0000
treeherdermozilla-beta@8a4f45b9a244 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjaws
bugs1201243
milestone77.0a1
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
Bug 1201243 - Make browser/components/preferences/in-content top-level and move dialogs to a subdirectory. r=jaws Differential Revision: https://phabricator.services.mozilla.com/D72038
.eslintrc.js
browser/base/content/test/pageinfo/browser_pageinfo_security.js
browser/base/content/test/siteIdentity/browser_identityPopup_clearSiteData.js
browser/components/about/AboutRedirector.cpp
browser/components/newtab/mochitest.sh
browser/components/preferences/applicationManager.js
browser/components/preferences/applicationManager.xhtml
browser/components/preferences/blocklists.js
browser/components/preferences/blocklists.xhtml
browser/components/preferences/browserLanguages.js
browser/components/preferences/browserLanguages.xhtml
browser/components/preferences/clearSiteData.css
browser/components/preferences/clearSiteData.js
browser/components/preferences/clearSiteData.xhtml
browser/components/preferences/colors.js
browser/components/preferences/colors.xhtml
browser/components/preferences/connection.js
browser/components/preferences/connection.xhtml
browser/components/preferences/containers.inc.xhtml
browser/components/preferences/containers.js
browser/components/preferences/containers.xhtml
browser/components/preferences/dialogs/applicationManager.js
browser/components/preferences/dialogs/applicationManager.xhtml
browser/components/preferences/dialogs/blocklists.js
browser/components/preferences/dialogs/blocklists.xhtml
browser/components/preferences/dialogs/browserLanguages.js
browser/components/preferences/dialogs/browserLanguages.xhtml
browser/components/preferences/dialogs/clearSiteData.css
browser/components/preferences/dialogs/clearSiteData.js
browser/components/preferences/dialogs/clearSiteData.xhtml
browser/components/preferences/dialogs/colors.js
browser/components/preferences/dialogs/colors.xhtml
browser/components/preferences/dialogs/connection.js
browser/components/preferences/dialogs/connection.xhtml
browser/components/preferences/dialogs/containers.js
browser/components/preferences/dialogs/containers.xhtml
browser/components/preferences/dialogs/fonts.js
browser/components/preferences/dialogs/fonts.xhtml
browser/components/preferences/dialogs/handlers.css
browser/components/preferences/dialogs/jar.mn
browser/components/preferences/dialogs/languages.js
browser/components/preferences/dialogs/languages.xhtml
browser/components/preferences/dialogs/moz.build
browser/components/preferences/dialogs/permissions.js
browser/components/preferences/dialogs/permissions.xhtml
browser/components/preferences/dialogs/sanitize.js
browser/components/preferences/dialogs/sanitize.xhtml
browser/components/preferences/dialogs/selectBookmark.js
browser/components/preferences/dialogs/selectBookmark.xhtml
browser/components/preferences/dialogs/siteDataRemoveSelected.js
browser/components/preferences/dialogs/siteDataRemoveSelected.xhtml
browser/components/preferences/dialogs/siteDataSettings.js
browser/components/preferences/dialogs/siteDataSettings.xhtml
browser/components/preferences/dialogs/sitePermissions.css
browser/components/preferences/dialogs/sitePermissions.js
browser/components/preferences/dialogs/sitePermissions.xhtml
browser/components/preferences/dialogs/syncChooseWhatToSync.js
browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
browser/components/preferences/dialogs/translation.js
browser/components/preferences/dialogs/translation.xhtml
browser/components/preferences/extensionControlled.js
browser/components/preferences/findInPage.js
browser/components/preferences/fonts.js
browser/components/preferences/fonts.xhtml
browser/components/preferences/fxaPairDevice.js
browser/components/preferences/fxaPairDevice.xhtml
browser/components/preferences/handlers.css
browser/components/preferences/home.inc.xhtml
browser/components/preferences/home.js
browser/components/preferences/in-content/containers.inc.xhtml
browser/components/preferences/in-content/containers.js
browser/components/preferences/in-content/extensionControlled.js
browser/components/preferences/in-content/findInPage.js
browser/components/preferences/in-content/fxaPairDevice.js
browser/components/preferences/in-content/fxaPairDevice.xhtml
browser/components/preferences/in-content/home.inc.xhtml
browser/components/preferences/in-content/home.js
browser/components/preferences/in-content/jar.mn
browser/components/preferences/in-content/main.inc.xhtml
browser/components/preferences/in-content/main.js
browser/components/preferences/in-content/moz.build
browser/components/preferences/in-content/preferences.js
browser/components/preferences/in-content/preferences.xhtml
browser/components/preferences/in-content/privacy.inc.xhtml
browser/components/preferences/in-content/privacy.js
browser/components/preferences/in-content/search.inc.xhtml
browser/components/preferences/in-content/search.js
browser/components/preferences/in-content/searchResults.inc.xhtml
browser/components/preferences/in-content/subdialogs.js
browser/components/preferences/in-content/sync.inc.xhtml
browser/components/preferences/in-content/sync.js
browser/components/preferences/in-content/syncChooseWhatToSync.js
browser/components/preferences/in-content/syncChooseWhatToSync.xhtml
browser/components/preferences/in-content/tests/.eslintrc.js
browser/components/preferences/in-content/tests/addons/pl-dictionary.xpi
browser/components/preferences/in-content/tests/addons/set_homepage.xpi
browser/components/preferences/in-content/tests/addons/set_newtab.xpi
browser/components/preferences/in-content/tests/browser.ini
browser/components/preferences/in-content/tests/browser_advanced_update.js
browser/components/preferences/in-content/tests/browser_applications_selection.js
browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js
browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js
browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js
browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js
browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xhtml
browser/components/preferences/in-content/tests/browser_bug1547020_lockedDownloadDir.js
browser/components/preferences/in-content/tests/browser_bug1579418.js
browser/components/preferences/in-content/tests/browser_bug410900.js
browser/components/preferences/in-content/tests/browser_bug731866.js
browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js
browser/components/preferences/in-content/tests/browser_cert_export.js
browser/components/preferences/in-content/tests/browser_change_app_handler.js
browser/components/preferences/in-content/tests/browser_checkspelling.js
browser/components/preferences/in-content/tests/browser_cloud_storage.js
browser/components/preferences/in-content/tests/browser_connection.js
browser/components/preferences/in-content/tests/browser_connection_bug1445991.js
browser/components/preferences/in-content/tests/browser_connection_bug1505330.js
browser/components/preferences/in-content/tests/browser_connection_bug388287.js
browser/components/preferences/in-content/tests/browser_connection_dnsoverhttps.js
browser/components/preferences/in-content/tests/browser_containers_name_input.js
browser/components/preferences/in-content/tests/browser_contentblocking.js
browser/components/preferences/in-content/tests/browser_contentblocking_categories.js
browser/components/preferences/in-content/tests/browser_cookie_exceptions_addRemove.js
browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
browser/components/preferences/in-content/tests/browser_defaultbrowser_alwayscheck.js
browser/components/preferences/in-content/tests/browser_engines.js
browser/components/preferences/in-content/tests/browser_extension_controlled.js
browser/components/preferences/in-content/tests/browser_filetype_dialog.js
browser/components/preferences/in-content/tests/browser_fluent.js
browser/components/preferences/in-content/tests/browser_healthreport.js
browser/components/preferences/in-content/tests/browser_homepage_default.js
browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js
browser/components/preferences/in-content/tests/browser_homepages_use_bookmark.js
browser/components/preferences/in-content/tests/browser_hometab_restore_defaults.js
browser/components/preferences/in-content/tests/browser_languages_subdialog.js
browser/components/preferences/in-content/tests/browser_layersacceleration.js
browser/components/preferences/in-content/tests/browser_masterpassword.js
browser/components/preferences/in-content/tests/browser_newtab_menu.js
browser/components/preferences/in-content/tests/browser_notifications_do_not_disturb.js
browser/components/preferences/in-content/tests/browser_password_management.js
browser/components/preferences/in-content/tests/browser_performance.js
browser/components/preferences/in-content/tests/browser_performance_e10srollout.js
browser/components/preferences/in-content/tests/browser_performance_non_e10s.js
browser/components/preferences/in-content/tests/browser_permissions_checkPermissionsWereAdded.js
browser/components/preferences/in-content/tests/browser_permissions_dialog.js
browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js
browser/components/preferences/in-content/tests/browser_privacy_passwordGenerationAndAutofill.js
browser/components/preferences/in-content/tests/browser_privacypane_2.js
browser/components/preferences/in-content/tests/browser_privacypane_3.js
browser/components/preferences/in-content/tests/browser_proxy_backup.js
browser/components/preferences/in-content/tests/browser_sanitizeOnShutdown_prefLocked.js
browser/components/preferences/in-content/tests/browser_searchDefaultEngine.js
browser/components/preferences/in-content/tests/browser_searchShowSuggestionsFirst.js
browser/components/preferences/in-content/tests/browser_search_no_results_change_category.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_1.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_2.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_3.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_4.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_5.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_6.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_7.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_8.js
browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_site_data.js
browser/components/preferences/in-content/tests/browser_search_within_preferences_1.js
browser/components/preferences/in-content/tests/browser_search_within_preferences_2.js
browser/components/preferences/in-content/tests/browser_search_within_preferences_command.js
browser/components/preferences/in-content/tests/browser_searchsuggestions.js
browser/components/preferences/in-content/tests/browser_security-1.js
browser/components/preferences/in-content/tests/browser_security-2.js
browser/components/preferences/in-content/tests/browser_site_login_exceptions.js
browser/components/preferences/in-content/tests/browser_spotlight.js
browser/components/preferences/in-content/tests/browser_subdialogs.js
browser/components/preferences/in-content/tests/browser_sync_disabled.js
browser/components/preferences/in-content/tests/browser_sync_pairing.js
browser/components/preferences/in-content/tests/browser_telemetry.js
browser/components/preferences/in-content/tests/browser_warning_permanent_private_browsing.js
browser/components/preferences/in-content/tests/engine1/manifest.json
browser/components/preferences/in-content/tests/engine2/manifest.json
browser/components/preferences/in-content/tests/head.js
browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
browser/components/preferences/in-content/tests/siteData/browser.ini
browser/components/preferences/in-content/tests/siteData/browser_clearSiteData.js
browser/components/preferences/in-content/tests/siteData/browser_siteData.js
browser/components/preferences/in-content/tests/siteData/browser_siteData2.js
browser/components/preferences/in-content/tests/siteData/browser_siteData3.js
browser/components/preferences/in-content/tests/siteData/browser_siteData_multi_select.js
browser/components/preferences/in-content/tests/siteData/head.js
browser/components/preferences/in-content/tests/siteData/offline/manifest.appcache
browser/components/preferences/in-content/tests/siteData/offline/offline.html
browser/components/preferences/in-content/tests/siteData/service_worker_test.html
browser/components/preferences/in-content/tests/siteData/service_worker_test.js
browser/components/preferences/in-content/tests/siteData/site_data_test.html
browser/components/preferences/in-content/tests/subdialog.xhtml
browser/components/preferences/in-content/tests/subdialog2.xhtml
browser/components/preferences/jar.mn
browser/components/preferences/languages.js
browser/components/preferences/languages.xhtml
browser/components/preferences/main.inc.xhtml
browser/components/preferences/main.js
browser/components/preferences/moz.build
browser/components/preferences/permissions.js
browser/components/preferences/permissions.xhtml
browser/components/preferences/preferences.js
browser/components/preferences/preferences.xhtml
browser/components/preferences/privacy.inc.xhtml
browser/components/preferences/privacy.js
browser/components/preferences/sanitize.js
browser/components/preferences/sanitize.xhtml
browser/components/preferences/search.inc.xhtml
browser/components/preferences/search.js
browser/components/preferences/searchResults.inc.xhtml
browser/components/preferences/selectBookmark.js
browser/components/preferences/selectBookmark.xhtml
browser/components/preferences/siteDataRemoveSelected.js
browser/components/preferences/siteDataRemoveSelected.xhtml
browser/components/preferences/siteDataSettings.js
browser/components/preferences/siteDataSettings.xhtml
browser/components/preferences/sitePermissions.css
browser/components/preferences/sitePermissions.js
browser/components/preferences/sitePermissions.xhtml
browser/components/preferences/subdialogs.js
browser/components/preferences/sync.inc.xhtml
browser/components/preferences/sync.js
browser/components/preferences/tests/.eslintrc.js
browser/components/preferences/tests/addons/pl-dictionary.xpi
browser/components/preferences/tests/addons/set_homepage.xpi
browser/components/preferences/tests/addons/set_newtab.xpi
browser/components/preferences/tests/browser.ini
browser/components/preferences/tests/browser_advanced_update.js
browser/components/preferences/tests/browser_applications_selection.js
browser/components/preferences/tests/browser_basic_rebuild_fonts_test.js
browser/components/preferences/tests/browser_browser_languages_subdialog.js
browser/components/preferences/tests/browser_bug1018066_resetScrollPosition.js
browser/components/preferences/tests/browser_bug1020245_openPreferences_to_paneContent.js
browser/components/preferences/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js
browser/components/preferences/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xhtml
browser/components/preferences/tests/browser_bug1547020_lockedDownloadDir.js
browser/components/preferences/tests/browser_bug1579418.js
browser/components/preferences/tests/browser_bug410900.js
browser/components/preferences/tests/browser_bug731866.js
browser/components/preferences/tests/browser_bug795764_cachedisabled.js
browser/components/preferences/tests/browser_cert_export.js
browser/components/preferences/tests/browser_change_app_handler.js
browser/components/preferences/tests/browser_checkspelling.js
browser/components/preferences/tests/browser_cloud_storage.js
browser/components/preferences/tests/browser_connection.js
browser/components/preferences/tests/browser_connection_bug1445991.js
browser/components/preferences/tests/browser_connection_bug1505330.js
browser/components/preferences/tests/browser_connection_bug388287.js
browser/components/preferences/tests/browser_connection_dnsoverhttps.js
browser/components/preferences/tests/browser_containers_name_input.js
browser/components/preferences/tests/browser_contentblocking.js
browser/components/preferences/tests/browser_contentblocking_categories.js
browser/components/preferences/tests/browser_cookie_exceptions_addRemove.js
browser/components/preferences/tests/browser_cookies_exceptions.js
browser/components/preferences/tests/browser_defaultbrowser_alwayscheck.js
browser/components/preferences/tests/browser_engines.js
browser/components/preferences/tests/browser_extension_controlled.js
browser/components/preferences/tests/browser_filetype_dialog.js
browser/components/preferences/tests/browser_fluent.js
browser/components/preferences/tests/browser_healthreport.js
browser/components/preferences/tests/browser_homepage_default.js
browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js
browser/components/preferences/tests/browser_homepages_use_bookmark.js
browser/components/preferences/tests/browser_hometab_restore_defaults.js
browser/components/preferences/tests/browser_languages_subdialog.js
browser/components/preferences/tests/browser_layersacceleration.js
browser/components/preferences/tests/browser_masterpassword.js
browser/components/preferences/tests/browser_newtab_menu.js
browser/components/preferences/tests/browser_notifications_do_not_disturb.js
browser/components/preferences/tests/browser_password_management.js
browser/components/preferences/tests/browser_performance.js
browser/components/preferences/tests/browser_performance_e10srollout.js
browser/components/preferences/tests/browser_performance_non_e10s.js
browser/components/preferences/tests/browser_permissions_checkPermissionsWereAdded.js
browser/components/preferences/tests/browser_permissions_dialog.js
browser/components/preferences/tests/browser_permissions_urlFieldHidden.js
browser/components/preferences/tests/browser_privacy_passwordGenerationAndAutofill.js
browser/components/preferences/tests/browser_privacypane_2.js
browser/components/preferences/tests/browser_privacypane_3.js
browser/components/preferences/tests/browser_proxy_backup.js
browser/components/preferences/tests/browser_sanitizeOnShutdown_prefLocked.js
browser/components/preferences/tests/browser_searchDefaultEngine.js
browser/components/preferences/tests/browser_searchShowSuggestionsFirst.js
browser/components/preferences/tests/browser_search_no_results_change_category.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_1.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_2.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_3.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_4.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_5.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_6.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_7.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_8.js
browser/components/preferences/tests/browser_search_subdialogs_within_preferences_site_data.js
browser/components/preferences/tests/browser_search_within_preferences_1.js
browser/components/preferences/tests/browser_search_within_preferences_2.js
browser/components/preferences/tests/browser_search_within_preferences_command.js
browser/components/preferences/tests/browser_searchsuggestions.js
browser/components/preferences/tests/browser_security-1.js
browser/components/preferences/tests/browser_security-2.js
browser/components/preferences/tests/browser_site_login_exceptions.js
browser/components/preferences/tests/browser_spotlight.js
browser/components/preferences/tests/browser_subdialogs.js
browser/components/preferences/tests/browser_sync_disabled.js
browser/components/preferences/tests/browser_sync_pairing.js
browser/components/preferences/tests/browser_telemetry.js
browser/components/preferences/tests/browser_warning_permanent_private_browsing.js
browser/components/preferences/tests/engine1/manifest.json
browser/components/preferences/tests/engine2/manifest.json
browser/components/preferences/tests/head.js
browser/components/preferences/tests/privacypane_tests_perwindow.js
browser/components/preferences/tests/siteData/browser.ini
browser/components/preferences/tests/siteData/browser_clearSiteData.js
browser/components/preferences/tests/siteData/browser_siteData.js
browser/components/preferences/tests/siteData/browser_siteData2.js
browser/components/preferences/tests/siteData/browser_siteData3.js
browser/components/preferences/tests/siteData/browser_siteData_multi_select.js
browser/components/preferences/tests/siteData/head.js
browser/components/preferences/tests/siteData/offline/manifest.appcache
browser/components/preferences/tests/siteData/offline/offline.html
browser/components/preferences/tests/siteData/service_worker_test.html
browser/components/preferences/tests/siteData/service_worker_test.js
browser/components/preferences/tests/siteData/site_data_test.html
browser/components/preferences/tests/subdialog.xhtml
browser/components/preferences/tests/subdialog2.xhtml
browser/components/preferences/translation.js
browser/components/preferences/translation.xhtml
browser/components/translation/test/browser_translation_exceptions.js
browser/fxr/content/prefs.js
browser/modules/SiteDataManager.jsm
testing/runtimes/manifest-runtimes-unix.json
testing/runtimes/manifest-runtimes-windows.json
toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
toolkit/locales/en-US/chrome/global/intl.properties
--- a/.eslintrc.js
+++ b/.eslintrc.js
@@ -828,17 +828,17 @@ module.exports = {
         "browser/components/extensions/test/browser/browser_ext_tabs_removeCSS.js",
         "browser/components/extensions/test/browser/browser_ext_tabs_zoom.js",
         "browser/components/extensions/test/browser/browser_ext_windows.js",
         "browser/components/extensions/test/browser/browser_ext_windows_events.js",
         "browser/components/extensions/test/browser/head.js",
         "browser/components/extensions/test/browser/head_webNavigation.js",
         "browser/components/extensions/test/xpcshell/test_ext_url_overrides_newtab.js",
         "browser/components/migration/tests/unit/test_Edge_db_migration.js",
-        "browser/components/preferences/in-content/tests/browser_contentblocking.js",
+        "browser/components/preferences/tests/browser_contentblocking.js",
         "browser/components/translation/test/unit/test_cld2.js",
         "browser/components/urlbar/tests/ext/browser/update/browser_getBrowserUpdateStatus_updateDisabledByPolicy.js",
         "browser/extensions/doh-rollout/experiments/doorhanger/api.js",
         "browser/extensions/doh-rollout/experiments/doorhanger/api.js",
         "browser/extensions/doh-rollout/test/browser/browser_policyOverride.js",
         "browser/extensions/doh-rollout/test/unit/test_localStorageMigration.js",
         "browser/extensions/formautofill/test/unit/head.js",
         "browser/extensions/formautofill/test/unit/test_creditCardRecords.js",
--- a/browser/base/content/test/pageinfo/browser_pageinfo_security.js
+++ b/browser/base/content/test/pageinfo/browser_pageinfo_security.js
@@ -8,17 +8,17 @@ ChromeUtils.defineModuleGetter(
   "DownloadUtils",
   "resource://gre/modules/DownloadUtils.jsm"
 );
 
 const TEST_ORIGIN = "https://example.com";
 const TEST_HTTP_ORIGIN = "http://example.com";
 const TEST_SUB_ORIGIN = "https://test1.example.com";
 const REMOVE_DIALOG_URL =
-  "chrome://browser/content/preferences/siteDataRemoveSelected.xhtml";
+  "chrome://browser/content/preferences/dialogs/siteDataRemoveSelected.xhtml";
 const TEST_ORIGIN_CERT_ERROR = "https://expired.example.com";
 
 const TEST_PATH = getRootDirectory(gTestPath).replace(
   "chrome://mochitests/content",
   "https://example.com"
 );
 
 // Test opening the correct certificate information when clicking "Show certificate".
--- a/browser/base/content/test/siteIdentity/browser_identityPopup_clearSiteData.js
+++ b/browser/base/content/test/siteIdentity/browser_identityPopup_clearSiteData.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 const TEST_ORIGIN = "https://example.com";
 const TEST_SUB_ORIGIN = "https://test1.example.com";
 const REMOVE_DIALOG_URL =
-  "chrome://browser/content/preferences/siteDataRemoveSelected.xhtml";
+  "chrome://browser/content/preferences/dialogs/siteDataRemoveSelected.xhtml";
 
 // Greek IDN for 'example.test'.
 const TEST_IDN_ORIGIN =
   "https://\u03C0\u03B1\u03C1\u03AC\u03B4\u03B5\u03B9\u03B3\u03BC\u03B1.\u03B4\u03BF\u03BA\u03B9\u03BC\u03AE";
 const TEST_PUNY_ORIGIN = "https://xn--hxajbheg2az3al.xn--jxalpdlp/";
 const TEST_PUNY_SUB_ORIGIN = "https://sub1.xn--hxajbheg2az3al.xn--jxalpdlp/";
 
 ChromeUtils.defineModuleGetter(
--- a/browser/components/about/AboutRedirector.cpp
+++ b/browser/components/about/AboutRedirector.cpp
@@ -94,18 +94,17 @@ static const RedirEntry kRedirMap[] = {
     {"pocket-saved", "chrome://pocket/content/panels/saved.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::URI_CAN_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
          nsIAboutModule::HIDE_FROM_ABOUTABOUT},
     {"pocket-signup", "chrome://pocket/content/panels/signup.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::URI_CAN_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
          nsIAboutModule::HIDE_FROM_ABOUTABOUT},
-    {"preferences",
-     "chrome://browser/content/preferences/in-content/preferences.xhtml",
+    {"preferences", "chrome://browser/content/preferences/preferences.xhtml",
      nsIAboutModule::ALLOW_SCRIPT},
     {"downloads",
      "chrome://browser/content/downloads/contentAreaDownloadsView.xhtml",
      nsIAboutModule::ALLOW_SCRIPT},
     {"reader", "chrome://global/content/reader/aboutReader.html",
      nsIAboutModule::URI_SAFE_FOR_UNTRUSTED_CONTENT |
          nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::URI_MUST_LOAD_IN_CHILD |
          nsIAboutModule::HIDE_FROM_ABOUTABOUT},
--- a/browser/components/newtab/mochitest.sh
+++ b/browser/components/newtab/mochitest.sh
@@ -21,16 +21,16 @@ cd /mozilla-central && rm -rf ./objdir-f
   && ./mach test browser/components/newtab/test/browser --headless \
   && ./mach test browser/components/newtab/test/xpcshell \
   && ./mach test --log-tbpl test_run_log \
     browser/base/content/test/about/browser_aboutHome_search_telemetry.js \
     browser/base/content/test/static/browser_parsable_css.js \
     browser/base/content/test/tabs/browser_new_tab_in_privileged_process_pref.js \
     browser/components/enterprisepolicies/tests/browser/browser_policy_set_homepage.js \
     browser/components/extensions/test/browser/browser_ext_topSites.js \
-    browser/components/preferences/in-content/tests/browser_hometab_restore_defaults.js \
-    browser/components/preferences/in-content/tests/browser_newtab_menu.js \
-    browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_1.js \
+    browser/components/preferences/tests/browser_hometab_restore_defaults.js \
+    browser/components/preferences/tests/browser_newtab_menu.js \
+    browser/components/preferences/tests/browser_search_subdialogs_within_preferences_1.js \
     browser/components/search/test/browser/browser_google_behavior.js \
     browser/modules/test/browser/browser_UsageTelemetry_content.js \
   && ! grep -q TEST-UNEXPECTED test_run_log \
   && RUN_FIND_DUPES=1 ./mach package \
   && ./mach test --appname=dist all_files_referenced --headless
rename from browser/components/preferences/in-content/containers.inc.xhtml
rename to browser/components/preferences/containers.inc.xhtml
--- a/browser/components/preferences/in-content/containers.inc.xhtml
+++ b/browser/components/preferences/containers.inc.xhtml
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <!-- Containers panel -->
 
-<script src="chrome://browser/content/preferences/in-content/containers.js"/>
+<script src="chrome://browser/content/preferences/containers.js"/>
 
 <hbox hidden="true"
       class="container-header-links"
       data-category="paneContainers">
   <button id="backContainersButton" class="back-button" data-l10n-id="containers-back-button"/>
 </hbox>
 
 <hbox id="header-containers"
--- a/browser/components/preferences/containers.js
+++ b/browser/components/preferences/containers.js
@@ -1,175 +1,160 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+ * License, v. 2.0. If a copy of the MPL was not distributed with this file,
+ * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-const { ContextualIdentityService } = ChromeUtils.import(
+/* import-globals-from preferences.js */
+
+var { ContextualIdentityService } = ChromeUtils.import(
   "resource://gre/modules/ContextualIdentityService.jsm"
 );
 
-/**
- * We want to set the window title immediately to prevent flickers.
- */
-function setTitle() {
-  let params = window.arguments[0] || {};
+const defaultContainerIcon = "fingerprint";
+const defaultContainerColor = "blue";
 
-  let winElem = document.documentElement;
-  if (params.userContextId) {
-    document.l10n.setAttributes(winElem, "containers-window-update", {
-      name: params.identity.name,
-    });
-  } else {
-    document.l10n.setAttributes(winElem, "containers-window-new");
-  }
-}
-setTitle();
+let gContainersPane = {
+  init() {
+    this._list = document.getElementById("containersView");
 
-let gContainersManager = {
-  icons: [
-    "fingerprint",
-    "briefcase",
-    "dollar",
-    "cart",
-    "vacation",
-    "gift",
-    "food",
-    "fruit",
-    "pet",
-    "tree",
-    "chill",
-    "circle",
-    "fence",
-  ],
+    document
+      .getElementById("backContainersButton")
+      .addEventListener("command", function() {
+        gotoPref("general");
+      });
 
-  colors: [
-    "blue",
-    "turquoise",
-    "green",
-    "yellow",
-    "orange",
-    "red",
-    "pink",
-    "purple",
-    "toolbar",
-  ],
+    document
+      .getElementById("containersAdd")
+      .addEventListener("command", function() {
+        gContainersPane.onAddButtonCommand();
+      });
 
-  onLoad() {
-    let params = window.arguments[0] || {};
-    this.init(params);
+    this._rebuildView();
   },
 
-  init(aParams) {
-    this.userContextId = aParams.userContextId || null;
-    this.identity = aParams.identity;
-
-    const iconWrapper = document.getElementById("iconWrapper");
-    iconWrapper.appendChild(this.createIconButtons());
-
-    const colorWrapper = document.getElementById("colorWrapper");
-    colorWrapper.appendChild(this.createColorSwatches());
-
-    if (this.identity.name) {
-      const name = document.getElementById("name");
-      name.value = this.identity.name;
-      this.checkForm();
+  _rebuildView() {
+    const containers = ContextualIdentityService.getPublicIdentities();
+    while (this._list.firstChild) {
+      this._list.firstChild.remove();
     }
+    for (let container of containers) {
+      let item = document.createXULElement("richlistitem");
 
-    // This is to prevent layout jank caused by the svgs and outlines rendering at different times
-    document.getElementById("containers-content").removeAttribute("hidden");
-  },
+      let outer = document.createXULElement("hbox");
+      outer.setAttribute("flex", 1);
+      outer.setAttribute("align", "center");
+      item.appendChild(outer);
 
-  uninit() {},
+      let userContextIcon = document.createXULElement("hbox");
+      userContextIcon.className = "userContext-icon";
+      userContextIcon.setAttribute("width", 24);
+      userContextIcon.setAttribute("height", 24);
+      userContextIcon.classList.add("userContext-icon-inprefs");
+      userContextIcon.classList.add("identity-icon-" + container.icon);
+      userContextIcon.classList.add("identity-color-" + container.color);
+      outer.appendChild(userContextIcon);
 
-  // Check if name is provided to determine if the form can be submitted
-  checkForm() {
-    const name = document.getElementById("name");
-    let btnApplyChanges = document.getElementById("btnApplyChanges");
-    if (!name.value) {
-      btnApplyChanges.setAttribute("disabled", true);
-    } else {
-      btnApplyChanges.removeAttribute("disabled");
+      let label = document.createXULElement("label");
+      label.setAttribute("flex", 1);
+      label.setAttribute("crop", "end");
+      label.textContent = ContextualIdentityService.getUserContextLabel(
+        container.userContextId
+      );
+      outer.appendChild(label);
+
+      let containerButtons = document.createXULElement("hbox");
+      containerButtons.className = "container-buttons";
+      item.appendChild(containerButtons);
+
+      let prefsButton = document.createXULElement("button");
+      prefsButton.addEventListener("command", function(event) {
+        gContainersPane.onPreferenceCommand(event.originalTarget);
+      });
+      prefsButton.setAttribute("value", container.userContextId);
+      document.l10n.setAttributes(prefsButton, "containers-preferences-button");
+      containerButtons.appendChild(prefsButton);
+
+      let removeButton = document.createXULElement("button");
+      removeButton.addEventListener("command", function(event) {
+        gContainersPane.onRemoveCommand(event.originalTarget);
+      });
+      removeButton.setAttribute("value", container.userContextId);
+      document.l10n.setAttributes(removeButton, "containers-remove-button");
+      containerButtons.appendChild(removeButton);
+
+      this._list.appendChild(item);
     }
   },
 
-  createIconButtons(defaultIcon) {
-    let radiogroup = document.createXULElement("radiogroup");
-    radiogroup.setAttribute("id", "icon");
-    radiogroup.className = "icon-buttons radio-buttons";
+  async onRemoveCommand(button) {
+    let userContextId = parseInt(button.getAttribute("value"), 10);
+
+    let count = ContextualIdentityService.countContainerTabs(userContextId);
+    if (count > 0) {
+      let [
+        title,
+        message,
+        okButton,
+        cancelButton,
+      ] = await document.l10n.formatValues([
+        { id: "containers-remove-alert-title" },
+        { id: "containers-remove-alert-msg", args: { count } },
+        { id: "containers-remove-ok-button" },
+        { id: "containers-remove-cancel-button" },
+      ]);
 
-    for (let icon of this.icons) {
-      let iconSwatch = document.createXULElement("radio");
-      iconSwatch.id = "iconbutton-" + icon;
-      iconSwatch.name = "icon";
-      iconSwatch.type = "radio";
-      iconSwatch.value = icon;
+      let buttonFlags =
+        Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0 +
+        Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1;
 
-      if (this.identity.icon && this.identity.icon == icon) {
-        iconSwatch.setAttribute("selected", true);
+      let rv = Services.prompt.confirmEx(
+        window,
+        title,
+        message,
+        buttonFlags,
+        okButton,
+        cancelButton,
+        null,
+        null,
+        {}
+      );
+      if (rv != 0) {
+        return;
       }
 
-      document.l10n.setAttributes(iconSwatch, `containers-icon-${icon}`);
-      let iconElement = document.createXULElement("hbox");
-      iconElement.className = "userContext-icon";
-      iconElement.classList.add("identity-icon-" + icon);
-
-      iconSwatch.appendChild(iconElement);
-      radiogroup.appendChild(iconSwatch);
+      await ContextualIdentityService.closeContainerTabs(userContextId);
     }
 
-    return radiogroup;
+    ContextualIdentityService.remove(userContextId);
+    this._rebuildView();
   },
 
-  createColorSwatches(defaultColor) {
-    let radiogroup = document.createXULElement("radiogroup");
-    radiogroup.setAttribute("id", "color");
-    radiogroup.className = "radio-buttons";
-
-    for (let color of this.colors) {
-      let colorSwatch = document.createXULElement("radio");
-      colorSwatch.id = "colorswatch-" + color;
-      colorSwatch.name = "color";
-      colorSwatch.type = "radio";
-      colorSwatch.value = color;
+  onPreferenceCommand(button) {
+    this.openPreferenceDialog(button.getAttribute("value"));
+  },
 
-      if (this.identity.color && this.identity.color == color) {
-        colorSwatch.setAttribute("selected", true);
-      }
-
-      document.l10n.setAttributes(colorSwatch, `containers-color-${color}`);
-      let iconElement = document.createXULElement("hbox");
-      iconElement.className = "userContext-icon";
-      iconElement.classList.add("identity-icon-circle");
-      iconElement.classList.add("identity-color-" + color);
-
-      colorSwatch.appendChild(iconElement);
-      radiogroup.appendChild(colorSwatch);
-    }
-    return radiogroup;
+  onAddButtonCommand(button) {
+    this.openPreferenceDialog(null);
   },
 
-  onApplyChanges() {
-    let icon = document.getElementById("icon").value;
-    let color = document.getElementById("color").value;
-    let name = document.getElementById("name").value;
-
-    if (!this.icons.includes(icon)) {
-      throw new Error("Internal error. The icon value doesn't match.");
-    }
-
-    if (!this.colors.includes(color)) {
-      throw new Error("Internal error. The color value doesn't match.");
+  openPreferenceDialog(userContextId) {
+    let identity = {
+      name: "",
+      icon: defaultContainerIcon,
+      color: defaultContainerColor,
+    };
+    if (userContextId) {
+      identity = ContextualIdentityService.getPublicIdentityFromId(
+        userContextId
+      );
+      identity.name = ContextualIdentityService.getUserContextLabel(
+        identity.userContextId
+      );
     }
 
-    if (this.userContextId) {
-      ContextualIdentityService.update(this.userContextId, name, icon, color);
-    } else {
-      ContextualIdentityService.create(name, icon, color);
-    }
-    window.parent.location.reload();
-  },
-
-  onWindowKeyPress(aEvent) {
-    if (aEvent.keyCode == KeyEvent.DOM_VK_ESCAPE) {
-      window.close();
-    }
+    const params = { userContextId, identity };
+    gSubDialog.open(
+      "chrome://browser/content/preferences/dialogs/containers.xhtml",
+      null,
+      params
+    );
   },
 };
rename from browser/components/preferences/applicationManager.js
rename to browser/components/preferences/dialogs/applicationManager.js
--- a/browser/components/preferences/applicationManager.js
+++ b/browser/components/preferences/dialogs/applicationManager.js
@@ -1,25 +1,25 @@
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-/* import-globals-from in-content/main.js */
+/* import-globals-from ../main.js */
 
 var gAppManagerDialog = {
   _removed: [],
 
   onLoad() {
     document.mozSubdialogReady = this.init();
   },
 
   async init() {
     this.handlerInfo = window.arguments[0];
     Services.scriptloader.loadSubScript(
-      "chrome://browser/content/preferences/in-content/main.js",
+      "chrome://browser/content/preferences/main.js",
       window
     );
 
     document.addEventListener("dialogaccept", function() {
       gAppManagerDialog.onOK();
     });
 
     const appDescElem = document.getElementById("appDescription");
rename from browser/components/preferences/applicationManager.xhtml
rename to browser/components/preferences/dialogs/applicationManager.xhtml
--- a/browser/components/preferences/applicationManager.xhtml
+++ b/browser/components/preferences/dialogs/applicationManager.xhtml
@@ -16,17 +16,17 @@
         buttons="accept,cancel">
 
   <linkset>
     <html:link rel="localization" href="browser/preferences/applicationManager.ftl"/>
   </linkset>
 
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
-  <script src="chrome://browser/content/preferences/applicationManager.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/applicationManager.js"/>
 
   <commandset id="appManagerCommandSet">
     <command id="cmd_remove"
              oncommand="gAppManagerDialog.remove();"
              disabled="true"/>
   </commandset>
 
   <keyset id="appManagerKeyset">
rename from browser/components/preferences/blocklists.js
rename to browser/components/preferences/dialogs/blocklists.js
rename from browser/components/preferences/blocklists.xhtml
rename to browser/components/preferences/dialogs/blocklists.xhtml
--- a/browser/components/preferences/blocklists.xhtml
+++ b/browser/components/preferences/dialogs/blocklists.xhtml
@@ -18,17 +18,17 @@
         persist="screenX screenY width height"
         onkeypress="gBlocklistManager.onWindowKeyPress(event);">
 
   <linkset>
     <html:link rel="localization" href="branding/brand.ftl"/>
     <html:link rel="localization" href="browser/preferences/blocklists.ftl"/>
   </linkset>
 
-  <script src="chrome://browser/content/preferences/blocklists.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/blocklists.js"/>
 
   <keyset>
     <key data-l10n-id="blocklist-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane">
     <description id="blocklistsText" data-l10n-id="blocklist-description" control="url">
       <html:a target="_blank" class="text-link" data-l10n-name="disconnect-link" href="https://disconnect.me/"/>
rename from browser/components/preferences/browserLanguages.js
rename to browser/components/preferences/dialogs/browserLanguages.js
--- a/browser/components/preferences/browserLanguages.js
+++ b/browser/components/preferences/dialogs/browserLanguages.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
+/* import-globals-from ../../../../toolkit/content/preferencesBindings.js */
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 // This is exported by preferences.js but we can't import that in a subdialog.
 let { getAvailableLocales } = window.top;
 
 ChromeUtils.defineModuleGetter(
   this,
rename from browser/components/preferences/browserLanguages.xhtml
rename to browser/components/preferences/dialogs/browserLanguages.xhtml
--- a/browser/components/preferences/browserLanguages.xhtml
+++ b/browser/components/preferences/dialogs/browserLanguages.xhtml
@@ -20,17 +20,17 @@
 
   <linkset>
     <html:link rel="localization" href="branding/brand.ftl"/>
     <html:link rel="localization" href="browser/preferences/languages.ftl"/>
   </linkset>
 
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
-  <script src="chrome://browser/content/preferences/browserLanguages.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/browserLanguages.js"/>
 
   <description data-l10n-id="browser-languages-description"/>
 
   <box flex="1" style="display: grid; grid-template-rows: 1fr auto; grid-template-columns: 1fr auto;">
     <richlistbox id="selectedLocales"/>
     <vbox>
       <button id="up" class="action-button" disabled="true" data-l10n-id="languages-customize-moveup"/>
       <button id="down" class="action-button" disabled="true" data-l10n-id="languages-customize-movedown"/>
rename from browser/components/preferences/clearSiteData.css
rename to browser/components/preferences/dialogs/clearSiteData.css
rename from browser/components/preferences/clearSiteData.js
rename to browser/components/preferences/dialogs/clearSiteData.js
rename from browser/components/preferences/clearSiteData.xhtml
rename to browser/components/preferences/dialogs/clearSiteData.xhtml
--- a/browser/components/preferences/clearSiteData.xhtml
+++ b/browser/components/preferences/dialogs/clearSiteData.xhtml
@@ -1,31 +1,31 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/preferences/clearSiteData.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/preferences/dialogs/clearSiteData.css" type="text/css"?>
 
 <window id="ClearSiteDataDialog"
         windowtype="Browser:ClearSiteData"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         data-l10n-id="clear-site-data-window"
         data-l10n-attrs="title, style"
         persist="screenX screenY width height">
 
   <linkset>
     <html:link rel="localization" href="branding/brand.ftl"/>
     <html:link rel="localization" href="browser/preferences/clearSiteData.ftl"/>
   </linkset>
-  <script src="chrome://browser/content/preferences/clearSiteData.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/clearSiteData.js"/>
 
   <keyset>
     <key data-l10n-id="clear-site-data-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane">
     <description control="url" data-l10n-id="clear-site-data-description"/>
     <separator class="thin"/>
rename from browser/components/preferences/colors.js
rename to browser/components/preferences/dialogs/colors.js
--- a/browser/components/preferences/colors.js
+++ b/browser/components/preferences/dialogs/colors.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
+/* import-globals-from ../../../../toolkit/content/preferencesBindings.js */
 
 document
   .getElementById("ColorsDialog")
   .addEventListener("dialoghelp", window.top.openPrefsHelp);
 
 Preferences.addAll([
   { id: "browser.display.document_color_use", type: "int" },
   { id: "browser.anchor_color", type: "string" },
rename from browser/components/preferences/colors.xhtml
rename to browser/components/preferences/dialogs/colors.xhtml
--- a/browser/components/preferences/colors.xhtml
+++ b/browser/components/preferences/dialogs/colors.xhtml
@@ -83,11 +83,11 @@
                   value="0" id="documentColorAutomatic"/>
         <menuitem data-l10n-id="colors-page-override-option-never"
                   value="1" id="documentColorNever"/>
       </menupopup>
     </menulist>
   </hbox>
 
   <!-- Load the script after the elements for layout issues (bug 1501755). -->
-  <script src="chrome://browser/content/preferences/colors.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/colors.js"/>
 </dialog>
 </window>
rename from browser/components/preferences/connection.js
rename to browser/components/preferences/dialogs/connection.js
--- a/browser/components/preferences/connection.js
+++ b/browser/components/preferences/dialogs/connection.js
@@ -1,16 +1,16 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../base/content/utilityOverlay.js */
-/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
-/* import-globals-from in-content/extensionControlled.js */
+/* import-globals-from ../../../base/content/utilityOverlay.js */
+/* import-globals-from ../../../../toolkit/content/preferencesBindings.js */
+/* import-globals-from ../extensionControlled.js */
 
 document
   .getElementById("ConnectionsDialog")
   .addEventListener("dialoghelp", window.top.openPrefsHelp);
 
 Preferences.addAll([
   // Add network.proxy.autoconfig_url before network.proxy.type so they're
   // both initialized when network.proxy.type initialization triggers a call to
rename from browser/components/preferences/connection.xhtml
rename to browser/components/preferences/dialogs/connection.xhtml
--- a/browser/components/preferences/connection.xhtml
+++ b/browser/components/preferences/dialogs/connection.xhtml
@@ -22,23 +22,23 @@
   <linkset>
     <html:link rel="localization" href="browser/preferences/connection.ftl"/>
     <html:link rel="localization" href="browser/preferences/preferences.ftl"/>
     <html:link rel="localization" href="branding/brand.ftl"/>
   </linkset>
 
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
-  <script src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>
+  <script src="chrome://browser/content/preferences/extensionControlled.js"/>
 
   <keyset>
     <key data-l10n-id="connection-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
-  <script src="chrome://browser/content/preferences/connection.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/connection.js"/>
 
   <hbox id="proxyExtensionContent"
         align="start" hidden="true" class="extension-controlled">
     <description control="disableProxyExtension" flex="1" />
     <button id="disableProxyExtension"
             class="extension-controlled-button accessory-button"
             data-l10n-id="connection-disable-extension" />
   </hbox>
copy from browser/components/preferences/containers.js
copy to browser/components/preferences/dialogs/containers.js
rename from browser/components/preferences/containers.xhtml
rename to browser/components/preferences/dialogs/containers.xhtml
--- a/browser/components/preferences/containers.xhtml
+++ b/browser/components/preferences/dialogs/containers.xhtml
@@ -15,17 +15,17 @@
         onunload="gContainersManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gContainersManager.onWindowKeyPress(event);">
 
   <linkset>
     <html:link rel="localization" href="browser/preferences/containers.ftl"/>
   </linkset>
 
-  <script src="chrome://browser/content/preferences/containers.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/containers.js"/>
 
   <keyset>
     <key data-l10n-id="containers-window-close" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane" hidden="true" id="containers-content">
     <hbox align="start">
       <label id="nameLabel" control="name"
rename from browser/components/preferences/fonts.js
rename to browser/components/preferences/dialogs/fonts.js
--- a/browser/components/preferences/fonts.js
+++ b/browser/components/preferences/dialogs/fonts.js
@@ -1,15 +1,15 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../base/content/utilityOverlay.js */
-/* import-globals-from ../../../toolkit/mozapps/preferences/fontbuilder.js */
+/* import-globals-from ../../../base/content/utilityOverlay.js */
+/* import-globals-from ../../../../toolkit/mozapps/preferences/fontbuilder.js */
 
 // browser.display.languageList LOCK ALL when LOCKED
 
 const kDefaultFontType = "font.default.%LANG%";
 const kFontNameFmtSerif = "font.name.serif.%LANG%";
 const kFontNameFmtSansSerif = "font.name.sans-serif.%LANG%";
 const kFontNameFmtMonospace = "font.name.monospace.%LANG%";
 const kFontNameListFmtSerif = "font.name-list.serif.%LANG%";
rename from browser/components/preferences/fonts.xhtml
rename to browser/components/preferences/dialogs/fonts.xhtml
--- a/browser/components/preferences/fonts.xhtml
+++ b/browser/components/preferences/dialogs/fonts.xhtml
@@ -264,11 +264,11 @@
           </menupopup>
         </menulist>
       </hbox>
     </hbox>
   </groupbox>
 
   <!-- Load the script after the elements for layout issues (bug 1501755). -->
   <script src="chrome://mozapps/content/preferences/fontbuilder.js"/>
-  <script src="chrome://browser/content/preferences/fonts.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/fonts.js"/>
 </dialog>
 </window>
rename from browser/components/preferences/handlers.css
rename to browser/components/preferences/dialogs/handlers.css
copy from browser/components/preferences/jar.mn
copy to browser/components/preferences/dialogs/jar.mn
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/dialogs/jar.mn
@@ -1,40 +1,42 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 browser.jar:
-    content/browser/preferences/applicationManager.xhtml
-    content/browser/preferences/applicationManager.js
-    content/browser/preferences/blocklists.xhtml
-    content/browser/preferences/blocklists.js
-    content/browser/preferences/browserLanguages.xhtml
-    content/browser/preferences/browserLanguages.js
-    content/browser/preferences/clearSiteData.css
-    content/browser/preferences/clearSiteData.js
-    content/browser/preferences/clearSiteData.xhtml
-    content/browser/preferences/colors.xhtml
-    content/browser/preferences/colors.js
-    content/browser/preferences/connection.xhtml
-    content/browser/preferences/connection.js
-    content/browser/preferences/fonts.xhtml
-    content/browser/preferences/fonts.js
-    content/browser/preferences/handlers.css
-    content/browser/preferences/languages.xhtml
-    content/browser/preferences/languages.js
-    content/browser/preferences/permissions.xhtml
-    content/browser/preferences/sitePermissions.xhtml
-    content/browser/preferences/sitePermissions.js
-    content/browser/preferences/sitePermissions.css
-    content/browser/preferences/containers.xhtml
-    content/browser/preferences/containers.js
-    content/browser/preferences/permissions.js
-    content/browser/preferences/sanitize.xhtml
-    content/browser/preferences/sanitize.js
-    content/browser/preferences/selectBookmark.xhtml
-    content/browser/preferences/selectBookmark.js
-    content/browser/preferences/siteDataSettings.xhtml
-    content/browser/preferences/siteDataSettings.js
-*   content/browser/preferences/siteDataRemoveSelected.xhtml
-    content/browser/preferences/siteDataRemoveSelected.js
-    content/browser/preferences/translation.xhtml
-    content/browser/preferences/translation.js
+   content/browser/preferences/dialogs/applicationManager.xhtml
+   content/browser/preferences/dialogs/applicationManager.js
+   content/browser/preferences/dialogs/blocklists.xhtml
+   content/browser/preferences/dialogs/blocklists.js
+   content/browser/preferences/dialogs/browserLanguages.xhtml
+   content/browser/preferences/dialogs/browserLanguages.js
+   content/browser/preferences/dialogs/clearSiteData.css
+   content/browser/preferences/dialogs/clearSiteData.js
+   content/browser/preferences/dialogs/clearSiteData.xhtml
+   content/browser/preferences/dialogs/colors.xhtml
+   content/browser/preferences/dialogs/colors.js
+   content/browser/preferences/dialogs/connection.xhtml
+   content/browser/preferences/dialogs/connection.js
+   content/browser/preferences/dialogs/fonts.xhtml
+   content/browser/preferences/dialogs/fonts.js
+   content/browser/preferences/dialogs/handlers.css
+   content/browser/preferences/dialogs/languages.xhtml
+   content/browser/preferences/dialogs/languages.js
+   content/browser/preferences/dialogs/permissions.xhtml
+   content/browser/preferences/dialogs/sitePermissions.xhtml
+   content/browser/preferences/dialogs/sitePermissions.js
+   content/browser/preferences/dialogs/sitePermissions.css
+   content/browser/preferences/dialogs/containers.xhtml
+   content/browser/preferences/dialogs/containers.js
+   content/browser/preferences/dialogs/permissions.js
+   content/browser/preferences/dialogs/sanitize.xhtml
+   content/browser/preferences/dialogs/sanitize.js
+   content/browser/preferences/dialogs/selectBookmark.xhtml
+   content/browser/preferences/dialogs/selectBookmark.js
+   content/browser/preferences/dialogs/siteDataSettings.xhtml
+   content/browser/preferences/dialogs/siteDataSettings.js
+*  content/browser/preferences/dialogs/siteDataRemoveSelected.xhtml
+   content/browser/preferences/dialogs/siteDataRemoveSelected.js
+   content/browser/preferences/dialogs/syncChooseWhatToSync.xhtml
+   content/browser/preferences/dialogs/syncChooseWhatToSync.js
+   content/browser/preferences/dialogs/translation.xhtml
+   content/browser/preferences/dialogs/translation.js
rename from browser/components/preferences/languages.js
rename to browser/components/preferences/dialogs/languages.js
--- a/browser/components/preferences/languages.js
+++ b/browser/components/preferences/dialogs/languages.js
@@ -1,14 +1,14 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
+/* import-globals-from ../../../../toolkit/content/preferencesBindings.js */
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 document
   .getElementById("LanguagesDialog")
   .addEventListener("dialoghelp", window.top.openPrefsHelp);
 
 Preferences.addAll([
rename from browser/components/preferences/languages.xhtml
rename to browser/components/preferences/dialogs/languages.xhtml
--- a/browser/components/preferences/languages.xhtml
+++ b/browser/components/preferences/dialogs/languages.xhtml
@@ -19,17 +19,17 @@
         helpTopic="prefs-languages">
 
   <linkset>
     <html:link rel="localization" href="browser/preferences/languages.ftl"/>
   </linkset>
 
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
-  <script src="chrome://browser/content/preferences/languages.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/languages.js"/>
 
   <keyset>
     <key data-l10n-id="languages-close-key" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
   <stringbundleset id="languageSet">
     <stringbundle id="bundleAccepted"     src="resource://gre/res/language.properties"/>
   </stringbundleset>
rename from browser/components/preferences/in-content/moz.build
rename to browser/components/preferences/dialogs/moz.build
rename from browser/components/preferences/permissions.js
rename to browser/components/preferences/dialogs/permissions.js
rename from browser/components/preferences/permissions.xhtml
rename to browser/components/preferences/dialogs/permissions.xhtml
--- a/browser/components/preferences/permissions.xhtml
+++ b/browser/components/preferences/dialogs/permissions.xhtml
@@ -1,33 +1,33 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/preferences/sitePermissions.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/preferences/dialogs/sitePermissions.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
 <window id="PermissionsDialog"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         data-l10n-id="permissions-window"
         data-l10n-attrs="title, style"
         onload="gPermissionManager.onLoad();"
         onunload="gPermissionManager.uninit();"
         persist="screenX screenY width height"
         onkeypress="gPermissionManager.onWindowKeyPress(event);">
 
   <linkset>
     <html:link rel="localization" href="browser/preferences/permissions.ftl"/>
   </linkset>
 
-  <script src="chrome://browser/content/preferences/permissions.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/permissions.js"/>
 
   <keyset>
     <key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane">
     <description id="permissionsText" control="url"/>
     <separator class="thin"/>
rename from browser/components/preferences/sanitize.js
rename to browser/components/preferences/dialogs/sanitize.js
--- a/browser/components/preferences/sanitize.js
+++ b/browser/components/preferences/dialogs/sanitize.js
@@ -1,14 +1,14 @@
 /* -*- indent-tabs-mode: nil; js-indent-level: 4 -*- */
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
+/* import-globals-from ../../../../toolkit/content/preferencesBindings.js */
 
 document
   .querySelector("dialog")
   .addEventListener("dialoghelp", window.top.openPrefsHelp);
 
 Preferences.addAll([
   { id: "privacy.clearOnShutdown.history", type: "bool" },
   { id: "privacy.clearOnShutdown.formdata", type: "bool" },
rename from browser/components/preferences/sanitize.xhtml
rename to browser/components/preferences/dialogs/sanitize.xhtml
--- a/browser/components/preferences/sanitize.xhtml
+++ b/browser/components/preferences/dialogs/sanitize.xhtml
@@ -28,17 +28,17 @@
 
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
 
   <keyset>
     <key data-l10n-id="window-close" modifiers="accel" oncommand="Preferences.close(event)"/>
   </keyset>
 
-  <script src="chrome://browser/content/preferences/sanitize.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/sanitize.js"/>
 
   <description data-l10n-id="clear-data-settings-label"></description>
 
   <groupbox>
     <label><html:h2 data-l10n-id="history-section-label"/></label>
     <hbox>
       <vbox data-l10n-id="sanitize-prefs-style" data-l10n-attrs="style">
         <checkbox data-l10n-id="item-history-and-downloads"
rename from browser/components/preferences/selectBookmark.js
rename to browser/components/preferences/dialogs/selectBookmark.js
rename from browser/components/preferences/selectBookmark.xhtml
rename to browser/components/preferences/dialogs/selectBookmark.xhtml
--- a/browser/components/preferences/selectBookmark.xhtml
+++ b/browser/components/preferences/dialogs/selectBookmark.xhtml
@@ -16,17 +16,17 @@
         persist="screenX screenY width height" screenX="24" screenY="24"
         onload="SelectBookmarkDialog.init();">
 <dialog id="selectBookmarkDialog">
 
   <linkset>
     <html:link rel="localization" href="browser/preferences/selectBookmark.ftl"/>
   </linkset>
 
-  <script src="chrome://browser/content/preferences/selectBookmark.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/selectBookmark.js"/>
   <script src="chrome://global/content/globalOverlay.js"/>
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://browser/content/places/places-tree.js"/>
 
   <description data-l10n-id="select-bookmark-desc"/>
 
   <separator class="thin"/>
 
rename from browser/components/preferences/siteDataRemoveSelected.js
rename to browser/components/preferences/dialogs/siteDataRemoveSelected.js
rename from browser/components/preferences/siteDataRemoveSelected.xhtml
rename to browser/components/preferences/dialogs/siteDataRemoveSelected.xhtml
--- a/browser/components/preferences/siteDataRemoveSelected.xhtml
+++ b/browser/components/preferences/dialogs/siteDataRemoveSelected.xhtml
@@ -1,16 +1,16 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/preferences/siteDataSettings.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/preferences/dialogs/siteDataSettings.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/siteDataSettings.css" type="text/css"?>
 
 <window windowtype="Browser:SiteDataRemoveSelected"
         width="500"
         data-l10n-id="site-data-removing-dialog"
         data-l10n-attrs="title"
         onload="gSiteDataRemoveSelected.init();"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
@@ -42,11 +42,11 @@
 
   <separator/>
 
   <label data-l10n-id="site-data-removing-table"/>
   <separator class="thin"/>
   <richlistbox id="removalList" class="theme-listbox" flex="1"/>
 
   <!-- Load the script after the elements for layout issues (bug 1501755). -->
-  <script src="chrome://browser/content/preferences/siteDataRemoveSelected.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/siteDataRemoveSelected.js"/>
 </dialog>
 </window>
rename from browser/components/preferences/siteDataSettings.js
rename to browser/components/preferences/dialogs/siteDataSettings.js
rename from browser/components/preferences/siteDataSettings.xhtml
rename to browser/components/preferences/dialogs/siteDataSettings.xhtml
--- a/browser/components/preferences/siteDataSettings.xhtml
+++ b/browser/components/preferences/dialogs/siteDataSettings.xhtml
@@ -1,17 +1,17 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/preferences/siteDataSettings.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/preferences/dialogs/siteDataSettings.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/siteDataSettings.css" type="text/css"?>
 
 <window id="SiteDataSettingsDialog" windowtype="Browser:SiteDataSettings"
         data-l10n-id="site-data-settings-window"
         data-l10n-attrs="title"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         style="width: 45em;"
@@ -19,17 +19,17 @@
         onkeypress="gSiteDataSettings.onKeyPress(event);"
         persist="screenX screenY width height">
 
   <linkset>
     <html:link rel="localization" href="branding/brand.ftl"/>
     <html:link rel="localization" href="browser/preferences/siteDataSettings.ftl"/>
   </linkset>
 
-  <script src="chrome://browser/content/preferences/siteDataSettings.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/siteDataSettings.js"/>
 
   <vbox flex="1" class="contentPane">
     <description id="settingsDescription" data-l10n-id="site-data-settings-description"/>
     <separator class="thin"/>
 
     <hbox id="searchBoxContainer">
       <search-textbox id="searchBox" flex="1"
         data-l10n-id="site-data-search-textbox"
rename from browser/components/preferences/sitePermissions.css
rename to browser/components/preferences/dialogs/sitePermissions.css
rename from browser/components/preferences/sitePermissions.js
rename to browser/components/preferences/dialogs/sitePermissions.js
--- a/browser/components/preferences/sitePermissions.js
+++ b/browser/components/preferences/dialogs/sitePermissions.js
@@ -1,13 +1,13 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from in-content/extensionControlled.js */
+/* import-globals-from ../extensionControlled.js */
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var { AppConstants } = ChromeUtils.import(
   "resource://gre/modules/AppConstants.jsm"
 );
 const { SitePermissions } = ChromeUtils.import(
   "resource:///modules/SitePermissions.jsm"
 );
rename from browser/components/preferences/sitePermissions.xhtml
rename to browser/components/preferences/dialogs/sitePermissions.xhtml
--- a/browser/components/preferences/sitePermissions.xhtml
+++ b/browser/components/preferences/dialogs/sitePermissions.xhtml
@@ -1,16 +1,16 @@
 <?xml version="1.0"?>
 
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
-<?xml-stylesheet href="chrome://browser/content/preferences/sitePermissions.css" type="text/css"?>
+<?xml-stylesheet href="chrome://browser/content/preferences/dialogs/sitePermissions.css" type="text/css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css" type="text/css"?>
 
 <window id="SitePermissionsDialog"
         windowtype="Browser:SitePermissions"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
         xmlns:html="http://www.w3.org/1999/xhtml"
         data-l10n-id="permissions-window"
         data-l10n-attrs="title, style"
@@ -19,18 +19,18 @@
         persist="screenX screenY width height"
         onkeypress="gSitePermissionsManager.onWindowKeyPress(event);">
 
   <linkset>
     <html:link rel="localization" href="browser/preferences/preferences.ftl"/>
     <html:link rel="localization" href="browser/preferences/permissions.ftl"/>
   </linkset>
 
-  <script src="chrome://browser/content/preferences/sitePermissions.js"/>
-  <script src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/sitePermissions.js"/>
+  <script src="chrome://browser/content/preferences/extensionControlled.js"/>
 
   <keyset>
     <key data-l10n-id="permissions-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane">
 
     <hbox align="center" id="setAutoplayPref" hidden="true">
rename from browser/components/preferences/in-content/syncChooseWhatToSync.js
rename to browser/components/preferences/dialogs/syncChooseWhatToSync.js
rename from browser/components/preferences/in-content/syncChooseWhatToSync.xhtml
rename to browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
--- a/browser/components/preferences/in-content/syncChooseWhatToSync.xhtml
+++ b/browser/components/preferences/dialogs/syncChooseWhatToSync.xhtml
@@ -18,17 +18,17 @@
         data-l10n-id="sync-choose-what-to-sync-dialog"
         data-l10n-attrs="buttonlabelaccept, buttonlabelextra2">
 
   <linkset>
     <html:link rel="localization" href="browser/branding/sync-brand.ftl"/>
     <html:link rel="localization" href="browser/preferences/preferences.ftl"/>
   </linkset>
   <script src="chrome://global/content/preferencesBindings.js"/>
-  <script src="chrome://browser/content/preferences/in-content/syncChooseWhatToSync.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/syncChooseWhatToSync.js"/>
 
   <html:div class="sync-engines-list">
     <html:div class="sync-engine-bookmarks">
       <checkbox data-l10n-id="sync-engine-bookmarks"
                 preference="services.sync.engine.bookmarks"/>
     </html:div>
     <html:div class="sync-engine-history">
       <checkbox data-l10n-id="sync-engine-history"
rename from browser/components/preferences/translation.js
rename to browser/components/preferences/dialogs/translation.js
rename from browser/components/preferences/translation.xhtml
rename to browser/components/preferences/dialogs/translation.xhtml
--- a/browser/components/preferences/translation.xhtml
+++ b/browser/components/preferences/dialogs/translation.xhtml
@@ -17,17 +17,17 @@
         onunload="gTranslationExceptions.uninit();"
         persist="screenX screenY width height"
         onkeypress="gTranslationExceptions.onWindowKeyPress(event);">
 
   <linkset>
     <html:link rel="localization" href="browser/preferences/translation.ftl"/>
   </linkset>
 
-  <script src="chrome://browser/content/preferences/translation.js"/>
+  <script src="chrome://browser/content/preferences/dialogs/translation.js"/>
 
   <keyset>
     <key data-l10n-id="translation-close-key" modifiers="accel" oncommand="window.close();"/>
   </keyset>
 
   <vbox class="contentPane">
     <vbox flex="1">
       <label id="languagesLabel"
rename from browser/components/preferences/in-content/extensionControlled.js
rename to browser/components/preferences/extensionControlled.js
rename from browser/components/preferences/in-content/findInPage.js
rename to browser/components/preferences/findInPage.js
rename from browser/components/preferences/in-content/fxaPairDevice.js
rename to browser/components/preferences/fxaPairDevice.js
rename from browser/components/preferences/in-content/fxaPairDevice.xhtml
rename to browser/components/preferences/fxaPairDevice.xhtml
--- a/browser/components/preferences/in-content/fxaPairDevice.xhtml
+++ b/browser/components/preferences/fxaPairDevice.xhtml
@@ -16,17 +16,17 @@
         onunload="gFxaPairDeviceDialog.uninit()"
         data-l10n-id="fxa-pair-device-dialog"
         data-l10n-attrs="title, style">
 
   <linkset>
     <html:link rel="localization" href="browser/branding/sync-brand.ftl"/>
     <html:link rel="localization" href="browser/preferences/fxaPairDevice.ftl"/>
   </linkset>
-  <script src="chrome://browser/content/preferences/in-content/fxaPairDevice.js"/>
+  <script src="chrome://browser/content/preferences/fxaPairDevice.js"/>
 
   <vbox id="qrCodeDisplay">
     <description class="pairHeading" data-l10n-id="fxa-qrcode-heading-phase1">
       <html:a
         id="connect-another-device-link"
         data-l10n-name="connect-another-device"
         class="text-link" target="_blank"/>
     </description>
rename from browser/components/preferences/in-content/home.inc.xhtml
rename to browser/components/preferences/home.inc.xhtml
--- a/browser/components/preferences/in-content/home.inc.xhtml
+++ b/browser/components/preferences/home.inc.xhtml
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <!-- Home panel -->
 
-<script src="chrome://browser/content/preferences/in-content/home.js"/>
+<script src="chrome://browser/content/preferences/home.js"/>
 <html:template id="template-paneHome">
 <hbox id="firefoxHomeCategory"
       class="subcategory"
       hidden="true"
       data-category="paneHome">
   <html:h1 style="-moz-box-flex: 1;" data-l10n-id="pane-home-title"/>
   <button id="restoreDefaultHomePageBtn"
           is="highlightable-button"
rename from browser/components/preferences/in-content/home.js
rename to browser/components/preferences/home.js
--- a/browser/components/preferences/in-content/home.js
+++ b/browser/components/preferences/home.js
@@ -389,17 +389,17 @@ var gHomePane = {
   /**
    * Displays a dialog in which the user can select a bookmark to use as home
    * page.  If the user selects a bookmark, that bookmark's name is displayed in
    * UI and the bookmark's address is stored to the home page preference.
    */
   setHomePageToBookmark() {
     const rv = { urls: null, names: null };
     gSubDialog.open(
-      "chrome://browser/content/preferences/selectBookmark.xhtml",
+      "chrome://browser/content/preferences/dialogs/selectBookmark.xhtml",
       "resizable=yes, modal=yes",
       rv,
       this._setHomePageToBookmarkClosed.bind(this, rv)
     );
     Services.telemetry.scalarAdd("preferences.use_bookmark", 1);
   },
 
   restoreDefaultHomePage() {
deleted file mode 100644
--- a/browser/components/preferences/in-content/containers.js
+++ /dev/null
@@ -1,160 +0,0 @@
-/* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this file,
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
-/* import-globals-from preferences.js */
-
-var { ContextualIdentityService } = ChromeUtils.import(
-  "resource://gre/modules/ContextualIdentityService.jsm"
-);
-
-const defaultContainerIcon = "fingerprint";
-const defaultContainerColor = "blue";
-
-let gContainersPane = {
-  init() {
-    this._list = document.getElementById("containersView");
-
-    document
-      .getElementById("backContainersButton")
-      .addEventListener("command", function() {
-        gotoPref("general");
-      });
-
-    document
-      .getElementById("containersAdd")
-      .addEventListener("command", function() {
-        gContainersPane.onAddButtonCommand();
-      });
-
-    this._rebuildView();
-  },
-
-  _rebuildView() {
-    const containers = ContextualIdentityService.getPublicIdentities();
-    while (this._list.firstChild) {
-      this._list.firstChild.remove();
-    }
-    for (let container of containers) {
-      let item = document.createXULElement("richlistitem");
-
-      let outer = document.createXULElement("hbox");
-      outer.setAttribute("flex", 1);
-      outer.setAttribute("align", "center");
-      item.appendChild(outer);
-
-      let userContextIcon = document.createXULElement("hbox");
-      userContextIcon.className = "userContext-icon";
-      userContextIcon.setAttribute("width", 24);
-      userContextIcon.setAttribute("height", 24);
-      userContextIcon.classList.add("userContext-icon-inprefs");
-      userContextIcon.classList.add("identity-icon-" + container.icon);
-      userContextIcon.classList.add("identity-color-" + container.color);
-      outer.appendChild(userContextIcon);
-
-      let label = document.createXULElement("label");
-      label.setAttribute("flex", 1);
-      label.setAttribute("crop", "end");
-      label.textContent = ContextualIdentityService.getUserContextLabel(
-        container.userContextId
-      );
-      outer.appendChild(label);
-
-      let containerButtons = document.createXULElement("hbox");
-      containerButtons.className = "container-buttons";
-      item.appendChild(containerButtons);
-
-      let prefsButton = document.createXULElement("button");
-      prefsButton.addEventListener("command", function(event) {
-        gContainersPane.onPreferenceCommand(event.originalTarget);
-      });
-      prefsButton.setAttribute("value", container.userContextId);
-      document.l10n.setAttributes(prefsButton, "containers-preferences-button");
-      containerButtons.appendChild(prefsButton);
-
-      let removeButton = document.createXULElement("button");
-      removeButton.addEventListener("command", function(event) {
-        gContainersPane.onRemoveCommand(event.originalTarget);
-      });
-      removeButton.setAttribute("value", container.userContextId);
-      document.l10n.setAttributes(removeButton, "containers-remove-button");
-      containerButtons.appendChild(removeButton);
-
-      this._list.appendChild(item);
-    }
-  },
-
-  async onRemoveCommand(button) {
-    let userContextId = parseInt(button.getAttribute("value"), 10);
-
-    let count = ContextualIdentityService.countContainerTabs(userContextId);
-    if (count > 0) {
-      let [
-        title,
-        message,
-        okButton,
-        cancelButton,
-      ] = await document.l10n.formatValues([
-        { id: "containers-remove-alert-title" },
-        { id: "containers-remove-alert-msg", args: { count } },
-        { id: "containers-remove-ok-button" },
-        { id: "containers-remove-cancel-button" },
-      ]);
-
-      let buttonFlags =
-        Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_0 +
-        Ci.nsIPrompt.BUTTON_TITLE_IS_STRING * Ci.nsIPrompt.BUTTON_POS_1;
-
-      let rv = Services.prompt.confirmEx(
-        window,
-        title,
-        message,
-        buttonFlags,
-        okButton,
-        cancelButton,
-        null,
-        null,
-        {}
-      );
-      if (rv != 0) {
-        return;
-      }
-
-      await ContextualIdentityService.closeContainerTabs(userContextId);
-    }
-
-    ContextualIdentityService.remove(userContextId);
-    this._rebuildView();
-  },
-
-  onPreferenceCommand(button) {
-    this.openPreferenceDialog(button.getAttribute("value"));
-  },
-
-  onAddButtonCommand(button) {
-    this.openPreferenceDialog(null);
-  },
-
-  openPreferenceDialog(userContextId) {
-    let identity = {
-      name: "",
-      icon: defaultContainerIcon,
-      color: defaultContainerColor,
-    };
-    if (userContextId) {
-      identity = ContextualIdentityService.getPublicIdentityFromId(
-        userContextId
-      );
-      identity.name = ContextualIdentityService.getUserContextLabel(
-        identity.userContextId
-      );
-    }
-
-    const params = { userContextId, identity };
-    gSubDialog.open(
-      "chrome://browser/content/preferences/containers.xhtml",
-      null,
-      params
-    );
-  },
-};
deleted file mode 100644
--- a/browser/components/preferences/in-content/jar.mn
+++ /dev/null
@@ -1,21 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-browser.jar:
-   content/browser/preferences/in-content/preferences.js
-   content/browser/preferences/in-content/extensionControlled.js
-*  content/browser/preferences/in-content/preferences.xhtml
-   content/browser/preferences/in-content/subdialogs.js
-
-   content/browser/preferences/in-content/main.js
-   content/browser/preferences/in-content/home.js
-   content/browser/preferences/in-content/search.js
-   content/browser/preferences/in-content/privacy.js
-   content/browser/preferences/in-content/containers.js
-   content/browser/preferences/in-content/sync.js
-   content/browser/preferences/in-content/syncChooseWhatToSync.xhtml
-   content/browser/preferences/in-content/syncChooseWhatToSync.js
-   content/browser/preferences/in-content/fxaPairDevice.xhtml
-   content/browser/preferences/in-content/fxaPairDevice.js
-   content/browser/preferences/in-content/findInPage.js
--- a/browser/components/preferences/jar.mn
+++ b/browser/components/preferences/jar.mn
@@ -1,40 +1,19 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 browser.jar:
-    content/browser/preferences/applicationManager.xhtml
-    content/browser/preferences/applicationManager.js
-    content/browser/preferences/blocklists.xhtml
-    content/browser/preferences/blocklists.js
-    content/browser/preferences/browserLanguages.xhtml
-    content/browser/preferences/browserLanguages.js
-    content/browser/preferences/clearSiteData.css
-    content/browser/preferences/clearSiteData.js
-    content/browser/preferences/clearSiteData.xhtml
-    content/browser/preferences/colors.xhtml
-    content/browser/preferences/colors.js
-    content/browser/preferences/connection.xhtml
-    content/browser/preferences/connection.js
-    content/browser/preferences/fonts.xhtml
-    content/browser/preferences/fonts.js
-    content/browser/preferences/handlers.css
-    content/browser/preferences/languages.xhtml
-    content/browser/preferences/languages.js
-    content/browser/preferences/permissions.xhtml
-    content/browser/preferences/sitePermissions.xhtml
-    content/browser/preferences/sitePermissions.js
-    content/browser/preferences/sitePermissions.css
-    content/browser/preferences/containers.xhtml
-    content/browser/preferences/containers.js
-    content/browser/preferences/permissions.js
-    content/browser/preferences/sanitize.xhtml
-    content/browser/preferences/sanitize.js
-    content/browser/preferences/selectBookmark.xhtml
-    content/browser/preferences/selectBookmark.js
-    content/browser/preferences/siteDataSettings.xhtml
-    content/browser/preferences/siteDataSettings.js
-*   content/browser/preferences/siteDataRemoveSelected.xhtml
-    content/browser/preferences/siteDataRemoveSelected.js
-    content/browser/preferences/translation.xhtml
-    content/browser/preferences/translation.js
+   content/browser/preferences/preferences.js
+   content/browser/preferences/extensionControlled.js
+*  content/browser/preferences/preferences.xhtml
+   content/browser/preferences/subdialogs.js
+
+   content/browser/preferences/main.js
+   content/browser/preferences/home.js
+   content/browser/preferences/search.js
+   content/browser/preferences/privacy.js
+   content/browser/preferences/containers.js
+   content/browser/preferences/sync.js
+   content/browser/preferences/fxaPairDevice.xhtml
+   content/browser/preferences/fxaPairDevice.js
+   content/browser/preferences/findInPage.js
rename from browser/components/preferences/in-content/main.inc.xhtml
rename to browser/components/preferences/main.inc.xhtml
--- a/browser/components/preferences/in-content/main.inc.xhtml
+++ b/browser/components/preferences/main.inc.xhtml
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <!-- General panel -->
 
-<script src="chrome://browser/content/preferences/in-content/main.js"/>
+<script src="chrome://browser/content/preferences/main.js"/>
 
 #ifdef MOZ_UPDATER
   <script src="chrome://browser/content/aboutDialog-appUpdater.js"/>
 #endif
 
 <script src="chrome://mozapps/content/preferences/fontbuilder.js"/>
 
 <html:template id="template-paneGeneral">
rename from browser/components/preferences/in-content/main.js
rename to browser/components/preferences/main.js
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/main.js
@@ -1,16 +1,17 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* import-globals-from extensionControlled.js */
 /* import-globals-from preferences.js */
-/* import-globals-from ../../../../toolkit/mozapps/preferences/fontbuilder.js */
-/* import-globals-from ../../../base/content/aboutDialog-appUpdater.js */
+/* import-globals-from ../../../toolkit/mozapps/preferences/fontbuilder.js */
+/* import-globals-from ../../base/content/aboutDialog-appUpdater.js */
+/* global MozXULElement */
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 var { Downloads } = ChromeUtils.import("resource://gre/modules/Downloads.jsm");
 var { FileUtils } = ChromeUtils.import("resource://gre/modules/FileUtils.jsm");
 var { TransientPrefs } = ChromeUtils.import(
   "resource:///modules/TransientPrefs.jsm"
 );
 var { AppConstants } = ChromeUtils.import(
@@ -1314,17 +1315,17 @@ var gMainPane = {
       document.getElementById("setDefaultPane").selectedIndex = selectedIndex;
     }
   },
 
   /**
    * Shows a dialog in which the preferred language for web content may be set.
    */
   showLanguages() {
-    gSubDialog.open("chrome://browser/content/preferences/languages.xhtml");
+    gSubDialog.open("chrome://browser/content/preferences/dialogs/languages.xhtml");
   },
 
   recordBrowserLanguagesTelemetry(method, value = null) {
     Services.telemetry.recordEvent(
       "intl.ui.browserLanguage",
       method,
       "main",
       value
@@ -1337,17 +1338,17 @@ var gMainPane = {
       Services.telemetry.msSinceProcessStart(),
       10
     ).toString();
     let method = search ? "search" : "manage";
     gMainPane.recordBrowserLanguagesTelemetry(method, telemetryId);
 
     let opts = { selected: gMainPane.selectedLocales, search, telemetryId };
     gSubDialog.open(
-      "chrome://browser/content/preferences/browserLanguages.xhtml",
+      "chrome://browser/content/preferences/dialogs/browserLanguages.xhtml",
       null,
       opts,
       this.browserLanguagesClosed
     );
   },
 
   /* Show or hide the confirm change message bar based on the updated ordering. */
   browserLanguagesClosed() {
@@ -1393,55 +1394,55 @@ var gMainPane = {
     }
   },
 
   /**
    * Displays the translation exceptions dialog where specific site and language
    * translation preferences can be set.
    */
   showTranslationExceptions() {
-    gSubDialog.open("chrome://browser/content/preferences/translation.xhtml");
+    gSubDialog.open("chrome://browser/content/preferences/dialogs/translation.xhtml");
   },
 
   openTranslationProviderAttribution() {
     var { Translation } = ChromeUtils.import(
       "resource:///modules/translation/TranslationParent.jsm"
     );
     Translation.openProviderAttribution();
   },
 
   /**
    * Displays the fonts dialog, where web page font names and sizes can be
    * configured.
    */
   configureFonts() {
     gSubDialog.open(
-      "chrome://browser/content/preferences/fonts.xhtml",
+      "chrome://browser/content/preferences/dialogs/fonts.xhtml",
       "resizable=no"
     );
   },
 
   /**
    * Displays the colors dialog, where default web page/link/etc. colors can be
    * configured.
    */
   configureColors() {
     gSubDialog.open(
-      "chrome://browser/content/preferences/colors.xhtml",
+      "chrome://browser/content/preferences/dialogs/colors.xhtml",
       "resizable=no"
     );
   },
 
   // NETWORK
   /**
    * Displays a dialog in which proxy settings may be changed.
    */
   showConnections() {
     gSubDialog.open(
-      "chrome://browser/content/preferences/connection.xhtml",
+      "chrome://browser/content/preferences/dialogs/connection.xhtml",
       null,
       null,
       this.updateProxySettingsUI.bind(this)
     );
   },
 
   // Update the UI to show the proper description depending on whether an
   // extension is in control or not.
@@ -2620,17 +2621,17 @@ var gMainPane = {
       // or "Always ask" if the previous default application has been removed
       this.rebuildActionsMenu();
 
       // update the richlistitem too. Will be visible when selecting another row
       this.selectedHandlerListItem.refreshAction();
     };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/applicationManager.xhtml",
+      "chrome://browser/content/preferences/dialogs/applicationManager.xhtml",
       "resizable=no",
       handlerInfo,
       onComplete
     );
   },
 
   async chooseApp(aEvent) {
     // Don't let the normal "on select action" handler get this event,
--- a/browser/components/preferences/moz.build
+++ b/browser/components/preferences/moz.build
@@ -1,21 +1,21 @@
 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 DIRS += [
-	'in-content'
+	'dialogs'
 ]
 
 BROWSER_CHROME_MANIFESTS += [
-    'in-content/tests/browser.ini',
-    'in-content/tests/siteData/browser.ini'
+    'tests/browser.ini',
+    'tests/siteData/browser.ini'
 ]
 
 for var in ('MOZ_APP_NAME', 'MOZ_MACBUNDLE_NAME'):
     DEFINES[var] = CONFIG[var]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('windows', 'gtk', 'cocoa'):
     DEFINES['HAVE_SHELL_SERVICE'] = 1
 
rename from browser/components/preferences/in-content/preferences.js
rename to browser/components/preferences/preferences.js
--- a/browser/components/preferences/in-content/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -6,19 +6,18 @@
 /* import-globals-from subdialogs.js */
 /* import-globals-from main.js */
 /* import-globals-from home.js */
 /* import-globals-from search.js */
 /* import-globals-from containers.js */
 /* import-globals-from privacy.js */
 /* import-globals-from sync.js */
 /* import-globals-from findInPage.js */
-/* import-globals-from ../../../base/content/utilityOverlay.js */
-/* import-globals-from ../../../../toolkit/content/preferencesBindings.js */
-/* global MozXULElement */
+/* import-globals-from ../../base/content/utilityOverlay.js */
+/* import-globals-from ../../../toolkit/content/preferencesBindings.js */
 
 "use strict";
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 ChromeUtils.defineModuleGetter(
   this,
   "AMTelemetry",
rename from browser/components/preferences/in-content/preferences.xhtml
rename to browser/components/preferences/preferences.xhtml
--- a/browser/components/preferences/in-content/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml
@@ -2,17 +2,17 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
    - You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <?xml-stylesheet href="chrome://global/skin/global.css"?>
 
 <?xml-stylesheet href="chrome://global/skin/in-content/common.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/preferences.css"?>
-<?xml-stylesheet href="chrome://browser/content/preferences/handlers.css"?>
+<?xml-stylesheet href="chrome://browser/content/preferences/dialogs/handlers.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/applications.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/search.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/containers.css"?>
 <?xml-stylesheet href="chrome://browser/skin/preferences/privacy.css"?>
 
 <!DOCTYPE html>
 
 <html xmlns="http://www.w3.org/1999/xhtml"
@@ -50,20 +50,20 @@
   <link rel="localization" href="toolkit/updates/history.ftl"/>
   <link rel="localization" href="security/certificates/deviceManager.ftl"/>
   <link rel="localization" href="security/certificates/certManager.ftl"/>
 
   <link rel="shortcut icon" href="chrome://global/skin/icons/settings.svg"/>
 
   <script src="chrome://browser/content/utilityOverlay.js"/>
   <script src="chrome://global/content/preferencesBindings.js"/>
-  <script src="chrome://browser/content/preferences/in-content/preferences.js"/>
-  <script src="chrome://browser/content/preferences/in-content/extensionControlled.js"/>
-  <script src="chrome://browser/content/preferences/in-content/findInPage.js"/>
-  <script src="chrome://browser/content/preferences/in-content/subdialogs.js"/>
+  <script src="chrome://browser/content/preferences/preferences.js"/>
+  <script src="chrome://browser/content/preferences/extensionControlled.js"/>
+  <script src="chrome://browser/content/preferences/findInPage.js"/>
+  <script src="chrome://browser/content/preferences/subdialogs.js"/>
 </head>
 
 <html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
            id="preferences-body">
 
   <stringbundle id="pkiBundle"
                 src="chrome://pippki/locale/pippki.properties"/>
   <stringbundle id="browserBundle"
rename from browser/components/preferences/in-content/privacy.inc.xhtml
rename to browser/components/preferences/privacy.inc.xhtml
--- a/browser/components/preferences/in-content/privacy.inc.xhtml
+++ b/browser/components/preferences/privacy.inc.xhtml
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <!-- Privacy panel -->
 
-<script src="chrome://browser/content/preferences/in-content/privacy.js"/>
+<script src="chrome://browser/content/preferences/privacy.js"/>
 <stringbundle id="signonBundle" src="chrome://passwordmgr/locale/passwordmgr.properties"/>
 <html:template id="template-panePrivacy">
 <hbox id="browserPrivacyCategory"
       class="subcategory"
       hidden="true"
       data-category="panePrivacy">
   <html:h1 data-l10n-id="privacy-header"/>
 </hbox>
rename from browser/components/preferences/in-content/privacy.js
rename to browser/components/preferences/privacy.js
--- a/browser/components/preferences/in-content/privacy.js
+++ b/browser/components/preferences/privacy.js
@@ -1347,17 +1347,17 @@ var gPrivacyPane = {
    *   Clear Private Data settings, false otherwise
    */
 
   /**
    * Displays the Clear Private Data settings dialog.
    */
   showClearPrivateDataSettings() {
     gSubDialog.open(
-      "chrome://browser/content/preferences/sanitize.xhtml",
+      "chrome://browser/content/preferences/dialogs/sanitize.xhtml",
       "resizable=no"
     );
   },
 
   /**
    * Displays a dialog from which individual parts of private data may be
    * cleared.
    */
@@ -1473,28 +1473,28 @@ var gPrivacyPane = {
    * Displays fine-grained, per-site preferences for tracking protection.
    */
   showTrackingProtectionExceptions() {
     let params = {
       permissionType: "trackingprotection",
       hideStatusColumn: true,
     };
     gSubDialog.open(
-      "chrome://browser/content/preferences/permissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/permissions.xhtml",
       null,
       params
     );
   },
 
   /**
    * Displays the available block lists for tracking protection.
    */
   showBlockLists() {
     gSubDialog.open(
-      "chrome://browser/content/preferences/blocklists.xhtml",
+      "chrome://browser/content/preferences/dialogs/blocklists.xhtml",
       null
     );
   },
 
   // COOKIES AND SITE DATA
 
   /*
    * Preferences:
@@ -1649,25 +1649,25 @@ var gPrivacyPane = {
     var params = {
       blockVisible: true,
       sessionVisible: true,
       allowVisible: true,
       prefilledHost: "",
       permissionType: "cookie",
     };
     gSubDialog.open(
-      "chrome://browser/content/preferences/permissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/permissions.xhtml",
       null,
       params
     );
   },
 
   showSiteDataSettings() {
     gSubDialog.open(
-      "chrome://browser/content/preferences/siteDataSettings.xhtml"
+      "chrome://browser/content/preferences/dialogs/siteDataSettings.xhtml"
     );
   },
 
   toggleSiteData(shouldShow) {
     let clearButton = document.getElementById("clearSiteDataButton");
     let settingsButton = document.getElementById("siteDataSettings");
     clearButton.disabled = !shouldShow;
     settingsButton.disabled = !shouldShow;
@@ -1693,106 +1693,106 @@ var gPrivacyPane = {
           value,
           unit,
         }
       );
     });
   },
 
   clearSiteData() {
-    gSubDialog.open("chrome://browser/content/preferences/clearSiteData.xhtml");
+    gSubDialog.open("chrome://browser/content/preferences/dialogs/clearSiteData.xhtml");
   },
 
   // GEOLOCATION
 
   /**
    * Displays the location exceptions dialog where specific site location
    * preferences can be set.
    */
   showLocationExceptions() {
     let params = { permissionType: "geo" };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/sitePermissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml",
       "resizable=yes",
       params
     );
   },
 
   // XR
 
   /**
    * Displays the XR exceptions dialog where specific site XR
    * preferences can be set.
    */
   showXRExceptions() {
     let params = { permissionType: "xr" };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/sitePermissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml",
       "resizable=yes",
       params
     );
   },
 
   // CAMERA
 
   /**
    * Displays the camera exceptions dialog where specific site camera
    * preferences can be set.
    */
   showCameraExceptions() {
     let params = { permissionType: "camera" };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/sitePermissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml",
       "resizable=yes",
       params
     );
   },
 
   // MICROPHONE
 
   /**
    * Displays the microphone exceptions dialog where specific site microphone
    * preferences can be set.
    */
   showMicrophoneExceptions() {
     let params = { permissionType: "microphone" };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/sitePermissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml",
       "resizable=yes",
       params
     );
   },
 
   // NOTIFICATIONS
 
   /**
    * Displays the notifications exceptions dialog where specific site notification
    * preferences can be set.
    */
   showNotificationExceptions() {
     let params = { permissionType: "desktop-notification" };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/sitePermissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml",
       "resizable=yes",
       params
     );
   },
 
   // MEDIA
 
   showAutoplayMediaExceptions() {
     var params = { permissionType: "autoplay-media" };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/sitePermissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml",
       "resizable=yes",
       params
     );
   },
 
   // POP-UPS
 
   /**
@@ -1804,17 +1804,17 @@ var gPrivacyPane = {
       blockVisible: false,
       sessionVisible: false,
       allowVisible: true,
       prefilledHost: "",
       permissionType: "popup",
     };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/permissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/permissions.xhtml",
       "resizable=yes",
       params
     );
   },
 
   // UTILITY FUNCTIONS
 
   /**
@@ -1849,17 +1849,17 @@ var gPrivacyPane = {
       sessionVisible: false,
       allowVisible: false,
       hideStatusColumn: true,
       prefilledHost: "",
       permissionType: "login-saving",
     };
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/permissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/permissions.xhtml",
       null,
       params
     );
   },
 
   /**
    * Initializes master password UI: the "use master password" checkbox, selects
    * the master password button to show, and enables/disables it as necessary.
@@ -2138,17 +2138,17 @@ var gPrivacyPane = {
 
   /**
    * Displays the exceptions lists for add-on installation warnings.
    */
   showAddonExceptions() {
     var params = this._addonParams;
 
     gSubDialog.open(
-      "chrome://browser/content/preferences/permissions.xhtml",
+      "chrome://browser/content/preferences/dialogs/permissions.xhtml",
       null,
       params
     );
   },
 
   /**
    * Parameters for the add-on install permissions dialog.
    */
rename from browser/components/preferences/in-content/search.inc.xhtml
rename to browser/components/preferences/search.inc.xhtml
--- a/browser/components/preferences/in-content/search.inc.xhtml
+++ b/browser/components/preferences/search.inc.xhtml
@@ -1,13 +1,13 @@
 <!-- This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
    - You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
-    <script src="chrome://browser/content/preferences/in-content/search.js"/>
+    <script src="chrome://browser/content/preferences/search.js"/>
     <html:template id="template-paneSearch">
     <hbox id="searchCategory"
           class="subcategory"
           hidden="true"
           data-category="paneSearch">
       <html:h1 data-l10n-id="pane-search-title"/>
     </hbox>
 
rename from browser/components/preferences/in-content/search.js
rename to browser/components/preferences/search.js
rename from browser/components/preferences/in-content/searchResults.inc.xhtml
rename to browser/components/preferences/searchResults.inc.xhtml
rename from browser/components/preferences/in-content/subdialogs.js
rename to browser/components/preferences/subdialogs.js
--- a/browser/components/preferences/in-content/subdialogs.js
+++ b/browser/components/preferences/subdialogs.js
@@ -1,13 +1,13 @@
 /* - This Source Code Form is subject to the terms of the Mozilla Public
    - License, v. 2.0. If a copy of the MPL was not distributed with this file,
    - You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-/* import-globals-from ../../../base/content/utilityOverlay.js */
+/* import-globals-from ../../base/content/utilityOverlay.js */
 /* import-globals-from preferences.js */
 
 "use strict";
 
 /**
  * SubDialog constructor creates a new subdialog from a template and appends
  * it to the parentElement.
  * @param {DOMNode} template: The template is copied to create a new dialog.
rename from browser/components/preferences/in-content/sync.inc.xhtml
rename to browser/components/preferences/sync.inc.xhtml
--- a/browser/components/preferences/in-content/sync.inc.xhtml
+++ b/browser/components/preferences/sync.inc.xhtml
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 <!-- Sync panel -->
 
-<script src="chrome://browser/content/preferences/in-content/sync.js"/>
+<script src="chrome://browser/content/preferences/sync.js"/>
 <html:template id="template-paneSync">
 <hbox id="firefoxAccountCategory"
       class="subcategory"
       hidden="true"
       data-category="paneSync">
   <html:h1 data-l10n-id="pane-sync-title2"/>
 </hbox>
 
rename from browser/components/preferences/in-content/sync.js
rename to browser/components/preferences/sync.js
--- a/browser/components/preferences/in-content/sync.js
+++ b/browser/components/preferences/sync.js
@@ -289,17 +289,17 @@ var gSyncPane = {
       }
     }
     let params = {};
     if (isAlreadySyncing) {
       // If we are already syncing then we also offer to disconnect.
       params.disconnectFun = () => this.disconnectSync();
     }
     gSubDialog.open(
-      "chrome://browser/content/preferences/in-content/syncChooseWhatToSync.xhtml",
+      "chrome://browser/content/preferences/dialogs/syncChooseWhatToSync.xhtml",
       "" /* aFeatures */,
       params /* aParams */,
       event => {
         /* aClosingCallback */
         if (!isAlreadySyncing && event.detail.button == "accept") {
           // We weren't syncing but the user has accepted the dialog - so we
           // want to start!
           fxAccounts.telemetry
@@ -560,17 +560,17 @@ var gSyncPane = {
     return window.docShell.rootTreeItem.domWindow.gSync.disconnect({
       confirm: true,
       disconnectAccount: false,
     });
   },
 
   pairAnotherDevice() {
     gSubDialog.open(
-      "chrome://browser/content/preferences/in-content/fxaPairDevice.xhtml",
+      "chrome://browser/content/preferences/fxaPairDevice.xhtml",
       "resizable=no" /* aFeatures */,
       null /* aParams */,
       null /* aClosingCallback */
     );
   },
 
   _populateComputerName(value) {
     let textbox = document.getElementById("fxaSyncComputerName");
rename from browser/components/preferences/in-content/tests/.eslintrc.js
rename to browser/components/preferences/tests/.eslintrc.js
rename from browser/components/preferences/in-content/tests/addons/pl-dictionary.xpi
rename to browser/components/preferences/tests/addons/pl-dictionary.xpi
rename from browser/components/preferences/in-content/tests/addons/set_homepage.xpi
rename to browser/components/preferences/tests/addons/set_homepage.xpi
rename from browser/components/preferences/in-content/tests/addons/set_newtab.xpi
rename to browser/components/preferences/tests/addons/set_newtab.xpi
rename from browser/components/preferences/in-content/tests/browser.ini
rename to browser/components/preferences/tests/browser.ini
rename from browser/components/preferences/in-content/tests/browser_advanced_update.js
rename to browser/components/preferences/tests/browser_advanced_update.js
rename from browser/components/preferences/in-content/tests/browser_applications_selection.js
rename to browser/components/preferences/tests/browser_applications_selection.js
rename from browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js
rename to browser/components/preferences/tests/browser_basic_rebuild_fonts_test.js
--- a/browser/components/preferences/in-content/tests/browser_basic_rebuild_fonts_test.js
+++ b/browser/components/preferences/tests/browser_basic_rebuild_fonts_test.js
@@ -95,17 +95,17 @@ add_task(async function() {
   let fontSizeField = doc.getElementById("defaultFontSize");
   is(
     fontSizeField.value,
     defaultFontSize,
     "Font size should be set correctly."
   );
 
   let promiseSubDialogLoaded = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/fonts.xhtml"
+    "chrome://browser/content/preferences/dialogs/fonts.xhtml"
   );
   doc.getElementById("advancedFonts").click();
   let win = await promiseSubDialogLoaded;
   doc = win.document;
 
   // Simulate a dumb font backend.
   win.FontBuilder._enumerator = {
     _list: ["MockedFont1", "MockedFont2", "MockedFont3"],
rename from browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js
rename to browser/components/preferences/tests/browser_browser_languages_subdialog.js
--- a/browser/components/preferences/in-content/tests/browser_browser_languages_subdialog.js
+++ b/browser/components/preferences/tests/browser_browser_languages_subdialog.js
@@ -2,17 +2,17 @@
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 ChromeUtils.import("resource://testing-common/AddonTestUtils.jsm", this);
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 AddonTestUtils.initMochitest(this);
 
 const BROWSER_LANGUAGES_URL =
-  "chrome://browser/content/preferences/browserLanguages.xhtml";
+  "chrome://browser/content/preferences/dialogs/browserLanguages.xhtml";
 const DICTIONARY_ID_PL = "pl@dictionaries.addons.mozilla.org";
 const TELEMETRY_CATEGORY = "intl.ui.browserLanguage";
 
 function langpackId(locale) {
   return `langpack-${locale}@firefox.mozilla.org`;
 }
 
 function getManifestData(locale, version = "2.0") {
rename from browser/components/preferences/in-content/tests/browser_bug1018066_resetScrollPosition.js
rename to browser/components/preferences/tests/browser_bug1018066_resetScrollPosition.js
rename from browser/components/preferences/in-content/tests/browser_bug1020245_openPreferences_to_paneContent.js
rename to browser/components/preferences/tests/browser_bug1020245_openPreferences_to_paneContent.js
rename from browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js
rename to browser/components/preferences/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.js
rename from browser/components/preferences/in-content/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xhtml
rename to browser/components/preferences/tests/browser_bug1184989_prevent_scrolling_when_preferences_flipped.xhtml
rename from browser/components/preferences/in-content/tests/browser_bug1547020_lockedDownloadDir.js
rename to browser/components/preferences/tests/browser_bug1547020_lockedDownloadDir.js
rename from browser/components/preferences/in-content/tests/browser_bug1579418.js
rename to browser/components/preferences/tests/browser_bug1579418.js
rename from browser/components/preferences/in-content/tests/browser_bug410900.js
rename to browser/components/preferences/tests/browser_bug410900.js
rename from browser/components/preferences/in-content/tests/browser_bug731866.js
rename to browser/components/preferences/tests/browser_bug731866.js
rename from browser/components/preferences/in-content/tests/browser_bug795764_cachedisabled.js
rename to browser/components/preferences/tests/browser_bug795764_cachedisabled.js
rename from browser/components/preferences/in-content/tests/browser_cert_export.js
rename to browser/components/preferences/tests/browser_cert_export.js
rename from browser/components/preferences/in-content/tests/browser_change_app_handler.js
rename to browser/components/preferences/tests/browser_change_app_handler.js
--- a/browser/components/preferences/in-content/tests/browser_change_app_handler.js
+++ b/browser/components/preferences/tests/browser_change_app_handler.js
@@ -86,17 +86,17 @@ add_task(async function() {
   ok(list.selectedItem, "Should have a selected item");
   ok(
     mimeInfo.preferredApplicationHandler.equals(list.selectedItem.handlerApp),
     "App should be visible as preferred item."
   );
 
   // Now try to 'manage' this list:
   dialogLoadedPromise = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/applicationManager.xhtml"
+    "chrome://browser/content/preferences/dialogs/applicationManager.xhtml"
   );
 
   let manageItem = list.menupopup.querySelector(".manage-app-item");
   cmdEvent = win.document.createEvent("xulcommandevent");
   cmdEvent.initCommandEvent(
     "command",
     true,
     true,
rename from browser/components/preferences/in-content/tests/browser_checkspelling.js
rename to browser/components/preferences/tests/browser_checkspelling.js
rename from browser/components/preferences/in-content/tests/browser_cloud_storage.js
rename to browser/components/preferences/tests/browser_cloud_storage.js
rename from browser/components/preferences/in-content/tests/browser_connection.js
rename to browser/components/preferences/tests/browser_connection.js
--- a/browser/components/preferences/in-content/tests/browser_connection.js
+++ b/browser/components/preferences/tests/browser_connection.js
@@ -12,17 +12,17 @@ function test() {
   // changes this setting from the default
   let oldNetworkProxyType = Services.prefs.getIntPref("network.proxy.type");
   registerCleanupFunction(function() {
     Services.prefs.setIntPref("network.proxy.type", oldNetworkProxyType);
     Services.prefs.clearUserPref("network.proxy.no_proxies_on");
     Services.prefs.clearUserPref("browser.preferences.instantApply");
   });
 
-  let connectionURL = "chrome://browser/content/preferences/connection.xhtml";
+  let connectionURL = "chrome://browser/content/preferences/dialogs/connection.xhtml";
 
   /*
   The connection dialog alone won't save onaccept since it uses type="child",
   so it has to be opened as a sub dialog of the main pref tab.
   Open the main tab here.
   */
   open_preferences(async function tabOpened(aContentWindow) {
     is(
rename from browser/components/preferences/in-content/tests/browser_connection_bug1445991.js
rename to browser/components/preferences/tests/browser_connection_bug1445991.js
--- a/browser/components/preferences/in-content/tests/browser_connection_bug1445991.js
+++ b/browser/components/preferences/tests/browser_connection_bug1445991.js
@@ -10,17 +10,17 @@ add_task(async function testAutoconfigRe
   await SpecialPowers.pushPrefEnv({
     set: [
       ["network.proxy.type", 2],
       ["network.proxy.autoconfig_url", "file:///nonexistent.pac"],
     ],
   });
 
   await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true });
-  const connectionURL = "chrome://browser/content/preferences/connection.xhtml";
+  const connectionURL = "chrome://browser/content/preferences/dialogs/connection.xhtml";
   const promiseDialogLoaded = promiseLoadSubDialog(connectionURL);
   gBrowser.contentDocument.getElementById("connectionSettings").click();
   const dialog = await promiseDialogLoaded;
 
   ok(
     !dialog.document.getElementById("autoReload").disabled,
     "Reload button is enabled when proxy type is autoconfig"
   );
rename from browser/components/preferences/in-content/tests/browser_connection_bug1505330.js
rename to browser/components/preferences/tests/browser_connection_bug1505330.js
--- a/browser/components/preferences/in-content/tests/browser_connection_bug1505330.js
+++ b/browser/components/preferences/tests/browser_connection_bug1505330.js
@@ -5,17 +5,17 @@
 "use strict";
 
 // Test the disabled status of the autoconfig Reload button when the proxy type
 // is autoconfig (network.proxy.type == 2).
 add_task(async function testAutoconfigReloadButton() {
   Services.prefs.lockPref("signon.autologin.proxy");
 
   await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true });
-  const connectionURL = "chrome://browser/content/preferences/connection.xhtml";
+  const connectionURL = "chrome://browser/content/preferences/dialogs/connection.xhtml";
   const promiseDialogLoaded = promiseLoadSubDialog(connectionURL);
   gBrowser.contentDocument.getElementById("connectionSettings").click();
   const dialog = await promiseDialogLoaded;
 
   ok(
     !dialog.document.getElementById("networkProxyType").firstChild.disabled,
     "Connection options should not be disabled"
   );
rename from browser/components/preferences/in-content/tests/browser_connection_bug388287.js
rename to browser/components/preferences/tests/browser_connection_bug388287.js
--- a/browser/components/preferences/in-content/tests/browser_connection_bug388287.js
+++ b/browser/components/preferences/tests/browser_connection_bug388287.js
@@ -1,17 +1,17 @@
 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 function test() {
   waitForExplicitFinish();
-  const connectionURL = "chrome://browser/content/preferences/connection.xhtml";
+  const connectionURL = "chrome://browser/content/preferences/dialogs/connection.xhtml";
   let closeable = false;
   let finalTest = false;
 
   // The changed preferences need to be backed up and restored because this mochitest
   // changes them setting from the default
   let oldNetworkProxyType = Services.prefs.getIntPref("network.proxy.type");
   registerCleanupFunction(function() {
     Services.prefs.setIntPref("network.proxy.type", oldNetworkProxyType);
rename from browser/components/preferences/in-content/tests/browser_connection_dnsoverhttps.js
rename to browser/components/preferences/tests/browser_connection_dnsoverhttps.js
--- a/browser/components/preferences/in-content/tests/browser_connection_dnsoverhttps.js
+++ b/browser/components/preferences/tests/browser_connection_dnsoverhttps.js
@@ -1,11 +1,11 @@
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
-const SUBDIALOG_URL = "chrome://browser/content/preferences/connection.xhtml";
+const SUBDIALOG_URL = "chrome://browser/content/preferences/dialogs/connection.xhtml";
 const TRR_MODE_PREF = "network.trr.mode";
 const TRR_URI_PREF = "network.trr.uri";
 const TRR_RESOLVERS_PREF = "network.trr.resolvers";
 const TRR_CUSTOM_URI_PREF = "network.trr.custom_uri";
 const DEFAULT_RESOLVER_VALUE = "https://mozilla.cloudflare-dns.com/dns-query";
 const NEXTDNS_RESOLVER_VALUE = "https://trr.dns.nextdns.io/";
 
 const modeCheckboxSelector = "#networkDnsOverHttps";
rename from browser/components/preferences/in-content/tests/browser_containers_name_input.js
rename to browser/components/preferences/tests/browser_containers_name_input.js
--- a/browser/components/preferences/in-content/tests/browser_containers_name_input.js
+++ b/browser/components/preferences/tests/browser_containers_name_input.js
@@ -1,9 +1,9 @@
-const CONTAINERS_URL = "chrome://browser/content/preferences/containers.xhtml";
+const CONTAINERS_URL = "chrome://browser/content/preferences/dialogs/containers.xhtml";
 
 add_task(async function setup() {
   await openPreferencesViaOpenPreferencesAPI("containers", { leaveOpen: true });
   registerCleanupFunction(async function() {
     BrowserTestUtils.removeTab(gBrowser.selectedTab);
   });
 });
 
rename from browser/components/preferences/in-content/tests/browser_contentblocking.js
rename to browser/components/preferences/tests/browser_contentblocking.js
rename from browser/components/preferences/in-content/tests/browser_contentblocking_categories.js
rename to browser/components/preferences/tests/browser_contentblocking_categories.js
rename from browser/components/preferences/in-content/tests/browser_cookie_exceptions_addRemove.js
rename to browser/components/preferences/tests/browser_cookie_exceptions_addRemove.js
--- a/browser/components/preferences/in-content/tests/browser_cookie_exceptions_addRemove.js
+++ b/browser/components/preferences/tests/browser_cookie_exceptions_addRemove.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const PERMISSIONS_URL =
-  "chrome://browser/content/preferences/permissions.xhtml";
+  "chrome://browser/content/preferences/dialogs/permissions.xhtml";
 
 async function openCookiesDialog(doc) {
   let cookieExceptionsButton = doc.getElementById("cookieExceptions");
   ok(cookieExceptionsButton, "cookieExceptionsButton found");
   let dialogPromise = promiseLoadSubDialog(PERMISSIONS_URL);
   cookieExceptionsButton.click();
   let dialog = await dialogPromise;
   return dialog;
rename from browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
rename to browser/components/preferences/tests/browser_cookies_exceptions.js
--- a/browser/components/preferences/in-content/tests/browser_cookies_exceptions.js
+++ b/browser/components/preferences/tests/browser_cookies_exceptions.js
@@ -501,17 +501,17 @@ async function runTest(test, getObservan
   });
 
   let doc = gBrowser.contentDocument;
   let historyMode = doc.getElementById("historyMode");
   historyMode.value = "custom";
   historyMode.doCommand();
 
   let promiseSubDialogLoaded = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/permissions.xhtml"
+    "chrome://browser/content/preferences/dialogs/permissions.xhtml"
   );
   doc.getElementById("cookieExceptions").doCommand();
 
   let win = await promiseSubDialogLoaded;
 
   doc = win.document;
   let params = {
     doc,
rename from browser/components/preferences/in-content/tests/browser_defaultbrowser_alwayscheck.js
rename to browser/components/preferences/tests/browser_defaultbrowser_alwayscheck.js
rename from browser/components/preferences/in-content/tests/browser_engines.js
rename to browser/components/preferences/tests/browser_engines.js
rename from browser/components/preferences/in-content/tests/browser_extension_controlled.js
rename to browser/components/preferences/tests/browser_extension_controlled.js
--- a/browser/components/preferences/in-content/tests/browser_extension_controlled.js
+++ b/browser/components/preferences/tests/browser_extension_controlled.js
@@ -19,17 +19,17 @@ XPCOMUtils.defineLazyPreferenceGetter(th
 const { AddonTestUtils } = ChromeUtils.import(
   "resource://testing-common/AddonTestUtils.jsm"
 );
 AddonTestUtils.initMochitest(this);
 
 const TEST_DIR = gTestPath.substr(0, gTestPath.lastIndexOf("/"));
 const CHROME_URL_ROOT = TEST_DIR + "/";
 const PERMISSIONS_URL =
-  "chrome://browser/content/preferences/sitePermissions.xhtml";
+  "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml";
 let sitePermissionsDialog;
 
 function getSupportsFile(path) {
   let cr = Cc["@mozilla.org/chrome/chrome-registry;1"].getService(
     Ci.nsIChromeRegistry
   );
   let uri = Services.io.newURI(CHROME_URL_ROOT + path);
   let fileurl = cr.convertChromeURL(uri);
@@ -963,17 +963,17 @@ add_task(async function testExtensionCon
 
 add_task(async function testExtensionControlledProxyConfig() {
   const proxySvc = Ci.nsIProtocolProxyService;
   const PROXY_DEFAULT = proxySvc.PROXYCONFIG_SYSTEM;
   const EXTENSION_ID = "@set_proxy";
   const CONTROLLED_SECTION_ID = "proxyExtensionContent";
   const CONTROLLED_BUTTON_ID = "disableProxyExtension";
   const CONNECTION_SETTINGS_DESC_ID = "connectionSettingsDescription";
-  const PANEL_URL = "chrome://browser/content/preferences/connection.xhtml";
+  const PANEL_URL = "chrome://browser/content/preferences/dialogs/connection.xhtml";
 
   await SpecialPowers.pushPrefEnv({ set: [[PROXY_PREF, PROXY_DEFAULT]] });
 
   function background() {
     browser.proxy.settings.set({ value: { proxyType: "none" } });
   }
 
   function expectedConnectionSettingsMessage(doc, isControlled) {
rename from browser/components/preferences/in-content/tests/browser_filetype_dialog.js
rename to browser/components/preferences/tests/browser_filetype_dialog.js
--- a/browser/components/preferences/in-content/tests/browser_filetype_dialog.js
+++ b/browser/components/preferences/tests/browser_filetype_dialog.js
@@ -152,17 +152,17 @@ add_task(async function dialogShowsCorre
   let list = pdfItem.querySelector(".actionsMenu");
   let popup = list.menupopup;
   let popupShown = BrowserTestUtils.waitForEvent(popup, "popupshown");
   EventUtils.synthesizeMouseAtCenter(list, {}, win);
   await popupShown;
 
   // Then open the dialog
   const promiseDialogLoaded = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/applicationManager.xhtml"
+    "chrome://browser/content/preferences/dialogs/applicationManager.xhtml"
   );
   EventUtils.synthesizeMouseAtCenter(
     popup.querySelector(".manage-app-item"),
     {},
     win
   );
   let dialogWin = await promiseDialogLoaded;
 
rename from browser/components/preferences/in-content/tests/browser_fluent.js
rename to browser/components/preferences/tests/browser_fluent.js
rename from browser/components/preferences/in-content/tests/browser_healthreport.js
rename to browser/components/preferences/tests/browser_healthreport.js
rename from browser/components/preferences/in-content/tests/browser_homepage_default.js
rename to browser/components/preferences/tests/browser_homepage_default.js
rename from browser/components/preferences/in-content/tests/browser_homepages_filter_aboutpreferences.js
rename to browser/components/preferences/tests/browser_homepages_filter_aboutpreferences.js
rename from browser/components/preferences/in-content/tests/browser_homepages_use_bookmark.js
rename to browser/components/preferences/tests/browser_homepages_use_bookmark.js
--- a/browser/components/preferences/in-content/tests/browser_homepages_use_bookmark.js
+++ b/browser/components/preferences/tests/browser_homepages_use_bookmark.js
@@ -31,17 +31,17 @@ add_task(async function testSetHomepageF
     url: TEST_URL1,
   });
 
   let doc = gBrowser.contentDocument;
   // Select the custom URLs option.
   doc.getElementById("homeMode").value = 2;
 
   let promiseSubDialogLoaded = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/selectBookmark.xhtml"
+    "chrome://browser/content/preferences/dialogs/selectBookmark.xhtml"
   );
   doc.getElementById("useBookmarkBtn").click();
 
   let dialog = await promiseSubDialogLoaded;
   dialog.document.getElementById("bookmarks").selectItems([bm.guid]);
   dialog.document
     .getElementById("selectBookmarkDialog")
     .getButton("accept")
@@ -64,17 +64,17 @@ add_task(async function testSetHomepageF
     url: TEST_URL2,
   });
 
   let doc = gBrowser.contentDocument;
   // Select the custom URLs option.
   doc.getElementById("homeMode").value = 2;
 
   let promiseSubDialogLoaded = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/selectBookmark.xhtml"
+    "chrome://browser/content/preferences/dialogs/selectBookmark.xhtml"
   );
   doc.getElementById("useBookmarkBtn").click();
 
   let dialog = await promiseSubDialogLoaded;
   dialog.document
     .getElementById("bookmarks")
     .selectItems([PlacesUtils.bookmarks.menuGuid]);
   dialog.document
rename from browser/components/preferences/in-content/tests/browser_hometab_restore_defaults.js
rename to browser/components/preferences/tests/browser_hometab_restore_defaults.js
rename from browser/components/preferences/in-content/tests/browser_languages_subdialog.js
rename to browser/components/preferences/tests/browser_languages_subdialog.js
--- a/browser/components/preferences/in-content/tests/browser_languages_subdialog.js
+++ b/browser/components/preferences/tests/browser_languages_subdialog.js
@@ -1,16 +1,16 @@
 add_task(async function() {
   await openPreferencesViaOpenPreferencesAPI("general", { leaveOpen: true });
   const contentDocument = gBrowser.contentDocument;
   const dialogOverlay = content.gSubDialog._preloadDialog._overlay;
 
   async function languagesSubdialogOpened() {
     const promiseSubDialogLoaded = promiseLoadSubDialog(
-      "chrome://browser/content/preferences/languages.xhtml"
+      "chrome://browser/content/preferences/dialogs/languages.xhtml"
     );
     contentDocument.getElementById("chooseLanguage").click();
     const win = await promiseSubDialogLoaded;
     win.Preferences.forceEnableInstantApply();
     is(dialogOverlay.style.visibility, "visible", "The dialog is visible.");
     return win;
   }
 
rename from browser/components/preferences/in-content/tests/browser_layersacceleration.js
rename to browser/components/preferences/tests/browser_layersacceleration.js
rename from browser/components/preferences/in-content/tests/browser_masterpassword.js
rename to browser/components/preferences/tests/browser_masterpassword.js
rename from browser/components/preferences/in-content/tests/browser_newtab_menu.js
rename to browser/components/preferences/tests/browser_newtab_menu.js
rename from browser/components/preferences/in-content/tests/browser_notifications_do_not_disturb.js
rename to browser/components/preferences/tests/browser_notifications_do_not_disturb.js
rename from browser/components/preferences/in-content/tests/browser_password_management.js
rename to browser/components/preferences/tests/browser_password_management.js
rename from browser/components/preferences/in-content/tests/browser_performance.js
rename to browser/components/preferences/tests/browser_performance.js
rename from browser/components/preferences/in-content/tests/browser_performance_e10srollout.js
rename to browser/components/preferences/tests/browser_performance_e10srollout.js
rename from browser/components/preferences/in-content/tests/browser_performance_non_e10s.js
rename to browser/components/preferences/tests/browser_performance_non_e10s.js
rename from browser/components/preferences/in-content/tests/browser_permissions_checkPermissionsWereAdded.js
rename to browser/components/preferences/tests/browser_permissions_checkPermissionsWereAdded.js
--- a/browser/components/preferences/in-content/tests/browser_permissions_checkPermissionsWereAdded.js
+++ b/browser/components/preferences/tests/browser_permissions_checkPermissionsWereAdded.js
@@ -1,15 +1,15 @@
 /* Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/publicdomain/zero/1.0/ */
 
 "use strict";
 
 const PERMISSIONS_URL =
-  "chrome://browser/content/preferences/permissions.xhtml";
+  "chrome://browser/content/preferences/dialogs/permissions.xhtml";
 
 const _checkAndOpenCookiesDialog = async doc => {
   let cookieExceptionsButton = doc.getElementById("cookieExceptions");
   ok(cookieExceptionsButton, "cookieExceptionsButton found");
   let dialogPromise = promiseLoadSubDialog(PERMISSIONS_URL);
   cookieExceptionsButton.click();
   let dialog = await dialogPromise;
   return dialog;
rename from browser/components/preferences/in-content/tests/browser_permissions_dialog.js
rename to browser/components/preferences/tests/browser_permissions_dialog.js
--- a/browser/components/preferences/in-content/tests/browser_permissions_dialog.js
+++ b/browser/components/preferences/tests/browser_permissions_dialog.js
@@ -6,17 +6,17 @@
 
 var { SitePermissions } = ChromeUtils.import(
   "resource:///modules/SitePermissions.jsm"
 );
 
 var { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
 const PERMISSIONS_URL =
-  "chrome://browser/content/preferences/sitePermissions.xhtml";
+  "chrome://browser/content/preferences/dialogs/sitePermissions.xhtml";
 const URL = "http://www.example.com";
 const URI = Services.io.newURI(URL);
 var sitePermissionsDialog;
 
 function checkPermissionItem(origin, state) {
   let doc = sitePermissionsDialog.document;
 
   let label = doc.getElementsByTagName("label")[3];
rename from browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js
rename to browser/components/preferences/tests/browser_permissions_urlFieldHidden.js
--- a/browser/components/preferences/in-content/tests/browser_permissions_urlFieldHidden.js
+++ b/browser/components/preferences/tests/browser_permissions_urlFieldHidden.js
@@ -1,12 +1,12 @@
 "use strict";
 
 const PERMISSIONS_URL =
-  "chrome://browser/content/preferences/permissions.xhtml";
+  "chrome://browser/content/preferences/dialogs/permissions.xhtml";
 
 add_task(async function urlFieldVisibleForPopupPermissions(finish) {
   await openPreferencesViaOpenPreferencesAPI("panePrivacy", {
     leaveOpen: true,
   });
   let win = gBrowser.selectedBrowser.contentWindow;
   let doc = win.document;
   let popupPolicyCheckbox = doc.getElementById("popupPolicy");
rename from browser/components/preferences/in-content/tests/browser_privacy_passwordGenerationAndAutofill.js
rename to browser/components/preferences/tests/browser_privacy_passwordGenerationAndAutofill.js
rename from browser/components/preferences/in-content/tests/browser_privacypane_2.js
rename to browser/components/preferences/tests/browser_privacypane_2.js
rename from browser/components/preferences/in-content/tests/browser_privacypane_3.js
rename to browser/components/preferences/tests/browser_privacypane_3.js
rename from browser/components/preferences/in-content/tests/browser_proxy_backup.js
rename to browser/components/preferences/tests/browser_proxy_backup.js
--- a/browser/components/preferences/in-content/tests/browser_proxy_backup.js
+++ b/browser/components/preferences/tests/browser_proxy_backup.js
@@ -23,17 +23,17 @@ function test() {
       }
       Services.prefs.clearUserPref("network.proxy.backup." + proxyType);
       Services.prefs.clearUserPref(
         "network.proxy.backup." + proxyType + "_port"
       );
     }
   });
 
-  let connectionURL = "chrome://browser/content/preferences/connection.xhtml";
+  let connectionURL = "chrome://browser/content/preferences/dialogs/connection.xhtml";
 
   // Set a shared proxy and an SSL backup
   Services.prefs.setIntPref("network.proxy.type", 1);
   Services.prefs.setBoolPref("network.proxy.share_proxy_settings", true);
   Services.prefs.setCharPref("network.proxy.http", "example.com");
   Services.prefs.setIntPref("network.proxy.http_port", 1200);
   Services.prefs.setCharPref("network.proxy.ssl", "example.com");
   Services.prefs.setIntPref("network.proxy.ssl_port", 1200);
rename from browser/components/preferences/in-content/tests/browser_sanitizeOnShutdown_prefLocked.js
rename to browser/components/preferences/tests/browser_sanitizeOnShutdown_prefLocked.js
rename from browser/components/preferences/in-content/tests/browser_searchDefaultEngine.js
rename to browser/components/preferences/tests/browser_searchDefaultEngine.js
rename from browser/components/preferences/in-content/tests/browser_searchShowSuggestionsFirst.js
rename to browser/components/preferences/tests/browser_searchShowSuggestionsFirst.js
rename from browser/components/preferences/in-content/tests/browser_search_no_results_change_category.js
rename to browser/components/preferences/tests/browser_search_no_results_change_category.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_1.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_1.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_2.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_2.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_3.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_3.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_4.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_4.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_5.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_5.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_6.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_6.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_7.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_7.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_8.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_8.js
rename from browser/components/preferences/in-content/tests/browser_search_subdialogs_within_preferences_site_data.js
rename to browser/components/preferences/tests/browser_search_subdialogs_within_preferences_site_data.js
rename from browser/components/preferences/in-content/tests/browser_search_within_preferences_1.js
rename to browser/components/preferences/tests/browser_search_within_preferences_1.js
rename from browser/components/preferences/in-content/tests/browser_search_within_preferences_2.js
rename to browser/components/preferences/tests/browser_search_within_preferences_2.js
rename from browser/components/preferences/in-content/tests/browser_search_within_preferences_command.js
rename to browser/components/preferences/tests/browser_search_within_preferences_command.js
rename from browser/components/preferences/in-content/tests/browser_searchsuggestions.js
rename to browser/components/preferences/tests/browser_searchsuggestions.js
rename from browser/components/preferences/in-content/tests/browser_security-1.js
rename to browser/components/preferences/tests/browser_security-1.js
rename from browser/components/preferences/in-content/tests/browser_security-2.js
rename to browser/components/preferences/tests/browser_security-2.js
rename from browser/components/preferences/in-content/tests/browser_site_login_exceptions.js
rename to browser/components/preferences/tests/browser_site_login_exceptions.js
--- a/browser/components/preferences/in-content/tests/browser_site_login_exceptions.js
+++ b/browser/components/preferences/tests/browser_site_login_exceptions.js
@@ -1,11 +1,11 @@
 "use strict";
 const PERMISSIONS_URL =
-  "chrome://browser/content/preferences/permissions.xhtml";
+  "chrome://browser/content/preferences/dialogs/permissions.xhtml";
 
 var exceptionsDialog;
 
 add_task(async function openLoginExceptionsSubDialog() {
   // ensure rememberSignons is off for this test;
   ok(
     !Services.prefs.getBoolPref("signon.rememberSignons"),
     "Check initial value of signon.rememberSignons pref"
rename from browser/components/preferences/in-content/tests/browser_spotlight.js
rename to browser/components/preferences/tests/browser_spotlight.js
rename from browser/components/preferences/in-content/tests/browser_subdialogs.js
rename to browser/components/preferences/tests/browser_subdialogs.js
rename from browser/components/preferences/in-content/tests/browser_sync_disabled.js
rename to browser/components/preferences/tests/browser_sync_disabled.js
rename from browser/components/preferences/in-content/tests/browser_sync_pairing.js
rename to browser/components/preferences/tests/browser_sync_pairing.js
--- a/browser/components/preferences/in-content/tests/browser_sync_pairing.js
+++ b/browser/components/preferences/tests/browser_sync_pairing.js
@@ -130,17 +130,17 @@ add_task(async function testError() {
     await promiseUnloaded;
   });
 });
 
 async function runWithPairingDialog(test) {
   await openPreferencesViaOpenPreferencesAPI("paneSync", { leaveOpen: true });
 
   let promiseSubDialogLoaded = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/in-content/fxaPairDevice.xhtml"
+    "chrome://browser/content/preferences/fxaPairDevice.xhtml"
   );
   gBrowser.contentWindow.gSyncPane.pairAnotherDevice();
 
   let win = await promiseSubDialogLoaded;
 
   await test(win);
 
   sinon.restore();
rename from browser/components/preferences/in-content/tests/browser_telemetry.js
rename to browser/components/preferences/tests/browser_telemetry.js
rename from browser/components/preferences/in-content/tests/browser_warning_permanent_private_browsing.js
rename to browser/components/preferences/tests/browser_warning_permanent_private_browsing.js
rename from browser/components/preferences/in-content/tests/engine1/manifest.json
rename to browser/components/preferences/tests/engine1/manifest.json
rename from browser/components/preferences/in-content/tests/engine2/manifest.json
rename to browser/components/preferences/tests/engine2/manifest.json
rename from browser/components/preferences/in-content/tests/head.js
rename to browser/components/preferences/tests/head.js
rename from browser/components/preferences/in-content/tests/privacypane_tests_perwindow.js
rename to browser/components/preferences/tests/privacypane_tests_perwindow.js
rename from browser/components/preferences/in-content/tests/siteData/browser.ini
rename to browser/components/preferences/tests/siteData/browser.ini
rename from browser/components/preferences/in-content/tests/siteData/browser_clearSiteData.js
rename to browser/components/preferences/tests/siteData/browser_clearSiteData.js
--- a/browser/components/preferences/in-content/tests/siteData/browser_clearSiteData.js
+++ b/browser/components/preferences/tests/siteData/browser_clearSiteData.js
@@ -59,17 +59,17 @@ async function testClearData(clearSiteDa
       return sizeLabel.textContent;
     }
   );
 
   let doc = gBrowser.selectedBrowser.contentDocument;
   let clearSiteDataButton = doc.getElementById("clearSiteDataButton");
 
   let dialogOpened = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/clearSiteData.xhtml"
+    "chrome://browser/content/preferences/dialogs/clearSiteData.xhtml"
   );
   clearSiteDataButton.doCommand();
   let dialogWin = await dialogOpened;
 
   // Convert the usage numbers in the same way the UI does it to assert
   // that they're displayed in the dialog.
   let [convertedTotalUsage] = DownloadUtils.convertByteUnits(totalUsage);
   // For cache we just assert that the right unit (KB, probably) is displayed,
rename from browser/components/preferences/in-content/tests/siteData/browser_siteData.js
rename to browser/components/preferences/tests/siteData/browser_siteData.js
rename from browser/components/preferences/in-content/tests/siteData/browser_siteData2.js
rename to browser/components/preferences/tests/siteData/browser_siteData2.js
rename from browser/components/preferences/in-content/tests/siteData/browser_siteData3.js
rename to browser/components/preferences/tests/siteData/browser_siteData3.js
rename from browser/components/preferences/in-content/tests/siteData/browser_siteData_multi_select.js
rename to browser/components/preferences/tests/siteData/browser_siteData_multi_select.js
rename from browser/components/preferences/in-content/tests/siteData/head.js
rename to browser/components/preferences/tests/siteData/head.js
--- a/browser/components/preferences/in-content/tests/siteData/head.js
+++ b/browser/components/preferences/tests/siteData/head.js
@@ -19,17 +19,17 @@ const TEST_OFFLINE_URL =
   ) + "/offline/offline.html";
 const TEST_SERVICE_WORKER_URL =
   getRootDirectory(gTestPath).replace(
     "chrome://mochitests/content",
     TEST_OFFLINE_ORIGIN
   ) + "/service_worker_test.html";
 
 const REMOVE_DIALOG_URL =
-  "chrome://browser/content/preferences/siteDataRemoveSelected.xhtml";
+  "chrome://browser/content/preferences/dialogs/siteDataRemoveSelected.xhtml";
 
 const { DownloadUtils } = ChromeUtils.import(
   "resource://gre/modules/DownloadUtils.jsm"
 );
 const { SiteDataManager } = ChromeUtils.import(
   "resource:///modules/SiteDataManager.jsm"
 );
 const { OfflineAppCacheHelper } = ChromeUtils.import(
@@ -145,17 +145,17 @@ function openPreferencesViaOpenPreferenc
   });
 }
 
 function openSiteDataSettingsDialog() {
   let doc = gBrowser.selectedBrowser.contentDocument;
   let settingsBtn = doc.getElementById("siteDataSettings");
   let dialogOverlay = content.gSubDialog._preloadDialog._overlay;
   let dialogLoadPromise = promiseLoadSubDialog(
-    "chrome://browser/content/preferences/siteDataSettings.xhtml"
+    "chrome://browser/content/preferences/dialogs/siteDataSettings.xhtml"
   );
   let dialogInitPromise = TestUtils.topicObserved(
     "sitedata-settings-init",
     () => true
   );
   let fullyLoadPromise = Promise.all([
     dialogLoadPromise,
     dialogInitPromise,
@@ -175,17 +175,17 @@ function promiseSettingsDialogClose() {
     let win = gBrowser.selectedBrowser.contentWindow;
     let dialogOverlay = win.gSubDialog._topDialog._overlay;
     let dialogWin = win.gSubDialog._topDialog._frame.contentWindow;
     dialogWin.addEventListener(
       "unload",
       function unload() {
         if (
           dialogWin.document.documentURI ===
-          "chrome://browser/content/preferences/siteDataSettings.xhtml"
+          "chrome://browser/content/preferences/dialogs/siteDataSettings.xhtml"
         ) {
           isnot(
             dialogOverlay.style.visibility,
             "visible",
             "The Settings dialog should be hidden"
           );
           resolve();
         }
rename from browser/components/preferences/in-content/tests/siteData/offline/manifest.appcache
rename to browser/components/preferences/tests/siteData/offline/manifest.appcache
rename from browser/components/preferences/in-content/tests/siteData/offline/offline.html
rename to browser/components/preferences/tests/siteData/offline/offline.html
rename from browser/components/preferences/in-content/tests/siteData/service_worker_test.html
rename to browser/components/preferences/tests/siteData/service_worker_test.html
rename from browser/components/preferences/in-content/tests/siteData/service_worker_test.js
rename to browser/components/preferences/tests/siteData/service_worker_test.js
rename from browser/components/preferences/in-content/tests/siteData/site_data_test.html
rename to browser/components/preferences/tests/siteData/site_data_test.html
rename from browser/components/preferences/in-content/tests/subdialog.xhtml
rename to browser/components/preferences/tests/subdialog.xhtml
rename from browser/components/preferences/in-content/tests/subdialog2.xhtml
rename to browser/components/preferences/tests/subdialog2.xhtml
--- a/browser/components/translation/test/browser_translation_exceptions.js
+++ b/browser/components/translation/test/browser_translation_exceptions.js
@@ -263,17 +263,17 @@ var gTests = [
     desc: "language exception list",
     run: async function checkLanguageExceptions() {
       // Put 2 languages in the pref before opening the window to check
       // the list is displayed on load.
       Services.prefs.setCharPref(kLanguagesPref, "fr,de");
 
       // Open the translation exceptions dialog.
       let win = openDialog(
-        "chrome://browser/content/preferences/translation.xhtml",
+        "chrome://browser/content/preferences/dialogs/translation.xhtml",
         "Browser:TranslationExceptions",
         "",
         null
       );
       await waitForWindowLoad(win);
 
       // Check that the list of language exceptions is loaded.
       let getById = win.document.getElementById.bind(win.document);
@@ -329,17 +329,17 @@ var gTests = [
       PermissionTestUtils.add(
         "http://example.com",
         "translate",
         Services.perms.DENY_ACTION
       );
 
       // Open the translation exceptions dialog.
       let win = openDialog(
-        "chrome://browser/content/preferences/translation.xhtml",
+        "chrome://browser/content/preferences/dialogs/translation.xhtml",
         "Browser:TranslationExceptions",
         "",
         null
       );
       await waitForWindowLoad(win);
 
       // Check that the list of language exceptions is loaded.
       let getById = win.document.getElementById.bind(win.document);
--- a/browser/fxr/content/prefs.js
+++ b/browser/fxr/content/prefs.js
@@ -60,17 +60,17 @@ function initClearAllData() {
         document.body.appendChild(clearModalContainer());
       } else {
         eClearTry.textContent = "Error";
       }
     });
   });
 }
 
-// Based on https://searchfox.org/mozilla-central/source/browser/components/preferences/in-content/privacy.js
+// Based on https://searchfox.org/mozilla-central/source/browser/components/preferences/privacy.js
 function initSubmitHealthReport() {
   let checkbox = document.getElementById("eCrashConfig");
 
   // Telemetry is only sending data if MOZ_TELEMETRY_REPORTING is defined.
   // We still want to display the preferences panel if that's not the case, but
   // we want it to be disabled and unchecked.
   if (
     Services.prefs.prefIsLocked(PREF_UPLOAD_ENABLED) ||
--- a/browser/modules/SiteDataManager.jsm
+++ b/browser/modules/SiteDataManager.jsm
@@ -508,17 +508,17 @@ var SiteDataManager = {
   promptSiteDataRemoval(win, removals) {
     if (removals) {
       let args = {
         hosts: removals,
         allowed: false,
       };
       let features = "centerscreen,chrome,modal,resizable=no";
       win.docShell.rootTreeItem.domWindow.openDialog(
-        "chrome://browser/content/preferences/siteDataRemoveSelected.xhtml",
+        "chrome://browser/content/preferences/dialogs/siteDataRemoveSelected.xhtml",
         "",
         features,
         args
       );
       return args.allowed;
     }
 
     let brandName = gBrandBundle.GetStringFromName("brandShortName");
--- a/testing/runtimes/manifest-runtimes-unix.json
+++ b/testing/runtimes/manifest-runtimes-unix.json
@@ -103,18 +103,18 @@
   "browser/components/newtab/test/browser/browser.ini": 73.89, 
   "browser/components/newtab/test/xpcshell/xpcshell.ini": 5.91, 
   "browser/components/originattributes/test/browser/browser.ini": 152.57, 
   "browser/components/originattributes/test/mochitest/mochitest.ini": 1.74, 
   "browser/components/places/tests/browser/browser.ini": 157.45, 
   "browser/components/places/tests/chrome/chrome.ini": 4.1, 
   "browser/components/places/tests/unit/xpcshell.ini": 58.03, 
   "browser/components/pocket/test/browser.ini": 6.1, 
-  "browser/components/preferences/in-content/tests/browser.ini": 580.55, 
-  "browser/components/preferences/in-content/tests/siteData/browser.ini": 52.38, 
+  "browser/components/preferences/tests/browser.ini": 580.55, 
+  "browser/components/preferences/tests/siteData/browser.ini": 52.38, 
   "browser/components/privatebrowsing/test/browser/browser.ini": 136.15, 
   "browser/components/protections/test/browser/browser.ini": 50.29, 
   "browser/components/protocolhandler/test/browser/browser.ini": 0.99, 
   "browser/components/protocolhandler/test/mochitest.ini": 1.55, 
   "browser/components/resistfingerprinting/test/browser/browser.ini": 126.39, 
   "browser/components/resistfingerprinting/test/chrome/chrome.ini": 1.33, 
   "browser/components/resistfingerprinting/test/mochitest/mochitest.ini": 20.38, 
   "browser/components/safebrowsing/content/test/browser.ini": 4.1, 
--- a/testing/runtimes/manifest-runtimes-windows.json
+++ b/testing/runtimes/manifest-runtimes-windows.json
@@ -104,18 +104,18 @@
   "browser/components/newtab/test/browser/browser.ini": 52.69, 
   "browser/components/newtab/test/xpcshell/xpcshell.ini": 2.42, 
   "browser/components/originattributes/test/browser/browser.ini": 104.14, 
   "browser/components/originattributes/test/mochitest/mochitest.ini": 1.57, 
   "browser/components/places/tests/browser/browser.ini": 137.78, 
   "browser/components/places/tests/chrome/chrome.ini": 3.75, 
   "browser/components/places/tests/unit/xpcshell.ini": 34.49, 
   "browser/components/pocket/test/browser.ini": 4.35, 
-  "browser/components/preferences/in-content/tests/browser.ini": 498.26, 
-  "browser/components/preferences/in-content/tests/siteData/browser.ini": 37.17, 
+  "browser/components/preferences/tests/browser.ini": 498.26, 
+  "browser/components/preferences/tests/siteData/browser.ini": 37.17, 
   "browser/components/privatebrowsing/test/browser/browser.ini": 132.51, 
   "browser/components/protections/test/browser/browser.ini": 45.87, 
   "browser/components/protocolhandler/test/browser/browser.ini": 0.43, 
   "browser/components/protocolhandler/test/mochitest.ini": 1.41, 
   "browser/components/resistfingerprinting/test/browser/browser.ini": 90.31, 
   "browser/components/resistfingerprinting/test/chrome/chrome.ini": 1.61, 
   "browser/components/resistfingerprinting/test/mochitest/mochitest.ini": 18.44, 
   "browser/components/safebrowsing/content/test/browser.ini": 2.07, 
--- a/toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
+++ b/toolkit/components/passwordmgr/test/browser/browser_exceptions_dialog.js
@@ -1,15 +1,15 @@
 "use strict";
 
 const LOGIN_HOST = "http://example.com";
 
 function openExceptionsDialog() {
   return window.openDialog(
-    "chrome://browser/content/preferences/permissions.xhtml",
+    "chrome://browser/content/preferences/dialogs/permissions.xhtml",
     "Toolkit:PasswordManagerExceptions",
     "",
     {
       blockVisible: true,
       sessionVisible: false,
       allowVisible: false,
       hideStatusColumn: true,
       prefilledHost: "",
--- a/toolkit/locales/en-US/chrome/global/intl.properties
+++ b/toolkit/locales/en-US/chrome/global/intl.properties
@@ -22,17 +22,17 @@
 # intl.accept_languages=br, fr-FR, fr, en-GB, en
 intl.accept_languages=en-US, en
 
 # LOCALIZATION NOTE (font.language.group):
 # This preference controls the initial setting of the language drop-down menu
 # in the Fonts and Colors > Advanced preference panel.
 #
 # Set it to the value of one of the menuitems in the "selectLangs" menulist in
-# http://dxr.mozilla.org/mozilla-central/source/browser/components/preferences/fonts.xhtml
+# http://dxr.mozilla.org/mozilla-central/source/browser/components/preferences/dialogs/fonts.xhtml
 font.language.group=x-western
 
 # LOCALIZATION NOTE (intl.charset.detector):
 # This preference controls the initial setting for the character encoding
 # detector. Valid values are ja_parallel_state_machine for Japanese, ruprob
 # for Russian and ukprob for Ukrainian and the empty string to turn detection
 # off. The value must be empty for locales other than Japanese, Russian and
 # Ukrainian.