chromium/chrome/test/data/webui/settings/settings_browsertest.cc

// Copyright 2023 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "base/test/scoped_feature_list.h"
#include "build/branding_buildflags.h"
#include "build/build_config.h"
#include "build/config/coverage/buildflags.h"
#include "chrome/browser/preloading/preloading_features.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/web_ui_mocha_browser_test.h"
#include "components/compose/buildflags.h"
#include "components/content_settings/core/common/features.h"
#include "components/performance_manager/public/features.h"
#include "components/permissions/features.h"
#include "components/privacy_sandbox/privacy_sandbox_features.h"
#include "components/safe_browsing/core/common/features.h"
#include "content/public/common/content_features.h"
#include "content/public/test/browser_test.h"
#include "crypto/crypto_buildflags.h"
#include "third_party/blink/public/common/features_generated.h"
#include "ui/compositor/compositor_switches.h"

#if BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)
#include "chrome/browser/browser_features.h"
#endif  // BUILDFLAG(IS_WIN) && BUILDFLAG(GOOGLE_CHROME_BRANDING)

class SettingsBrowserTest : public WebUIMochaBrowserTest {};

SettingsTest;

// Note: Keep tests below in alphabetical ordering.

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(SettingsTest, A11yPage) {}
#endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)

// Copied from Polymer 2 test:
// Times out on debug builders because the Settings page can take several
// seconds to load in a Release build and several times that in a Debug build.
// See https://crbug.com/558434.
#if !defined(NDEBUG)
#define MAYBE_AdvancedPage
#else
#define MAYBE_AdvancedPage
#endif
IN_PROC_BROWSER_TEST_F(SettingsTest, MAYBE_AdvancedPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, AntiAbusePage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, AppearanceFontsPage) {}

#if !BUILDFLAG(IS_CHROMEOS)
// TODO(crbug.com/40856240) Test is flaky on ChromeOS
IN_PROC_BROWSER_TEST_F(SettingsTest, AppearancePage) {}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, AutofillAddressValidation) {}

// TODO(crbug.com/40258836): Clean up this test after Password Manager redesign
// is launched.
IN_PROC_BROWSER_TEST_F(SettingsTest, AutofillPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, AutofillSection) {}

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(SettingsTest, AxAnnotationsSection) {}
#endif  // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_MAC)

IN_PROC_BROWSER_TEST_F(SettingsTest, BatteryPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, CategorySettingExceptions) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, Checkbox) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, CheckboxListEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ChooserExceptionList) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ChooserExceptionListEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, CollapseRadioButton) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ControlledButton) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ControlledRadioButton) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, CrPolicyPrefIndicator) {}

#if !BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(SettingsTest, DefaultBrowser) {}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, DoNotTrackToggle) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, DownloadsPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, DropdownMenu) {}

#if !BUILDFLAG(IS_MAC) && !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, EditDictionaryPage) {}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, ExperimentalAdvancedPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ExtensionControlledIndicator) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, FileSystemSettingsSiteDetails) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, FileSystemSettingsList) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, FileSystemSettingsListEntries) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, FileSystemSettingsListEntryItems) {}

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
IN_PROC_BROWSER_TEST_F(SettingsTest, GetMostChromePage) {
  RunTest("settings/get_most_chrome_page_test.js", "mocha.run()");
}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, HelpPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, IdleLoad) {}

#if !BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(SettingsTest, ImportDataDialog) {}
#endif

#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, Languages) {}
#endif

#if !BUILDFLAG(IS_CHROMEOS)
IN_PROC_BROWSER_TEST_F(SettingsTest, LiveCaptionSection) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, LiveTranslateSection) {}
#endif

// Copied from Polymer 2 version of tests:
// Times out on Windows Tests (dbg). See https://crbug.com/651296.
// Times out / crashes on chromium.linux/Linux Tests (dbg) crbug.com/667882
// Flaky everywhere crbug.com/1197768
IN_PROC_BROWSER_TEST_F(SettingsTest, DISABLED_MainPage) {}

#if BUILDFLAG(GOOGLE_CHROME_BRANDING) && !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, MetricsReporting) {
  RunTest("settings/metrics_reporting_test.js", "mocha.run()");
}
#endif

#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(SettingsTest, PasskeysSubpage) {
  RunTest("settings/passkeys_subpage_test.js", "mocha.run()");
}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, PaymentsSection) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, PaymentsSectionCardDialogs) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, PaymentsSectionCardRows) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, PaymentsSectionEditCreditCardLink) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, PaymentsSectionIban) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, PeoplePage) {}

#if BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, PeoplePageChromeOS) {
  RunTest("settings/people_page_test_cros.js", "mocha.run()");
}
#endif

#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, PeoplePageManageProfile) {}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, PeoplePageSyncControls) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, Prefs) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, PrefUtils) {}

class PeoplePageSyncPageTest : public SettingsBrowserTest {};

// Timeout on Linux dbg bots: https://crbug.com/1394737
#if !(BUILDFLAG(IS_LINUX) && !defined(NDEBUG))
IN_PROC_BROWSER_TEST_F(PeoplePageSyncPageTest, SyncSettings) {
  RunTest("settings/people_page_sync_page_test.js",
          "runMochaSuite('SyncSettings')");
}
#endif

IN_PROC_BROWSER_TEST_F(PeoplePageSyncPageTest, EEAChoiceCountry) {}

// TODO(crbug.com/324091979): Remove once crbug.com/324091979 launched.
IN_PROC_BROWSER_TEST_F(PeoplePageSyncPageTest, LinkedServicesDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, PerformanceMenu) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ProtocolHandlers) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, RecentSitePermissions) {}

#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, RelaunchConfirmationDialog) {}
#endif

// TODO(crbug.com/40719198): Flaky on all OSes. Enable the test.
IN_PROC_BROWSER_TEST_F(SettingsTest, DISABLED_ResetPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ResetProfileBanner) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SafetyCheckPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ScrollableMixin) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, Search) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SearchEngineEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SearchEngines) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SearchPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, Section) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SecureDnsInput) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SecureDns) {}

#if BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, SecureDnsDialog) {
  RunTest("settings/secure_dns_test.js",
          "runMochaSuite('OsSettingsRevampSecureDnsDialog')");
}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, SecurityKeysBioEnrollment) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SecurityKeysCredentialManagement) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SecurityKeysPhonesSubpage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SecurityKeysResetDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SecurityKeysSetPinDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SettingsCategoryDefaultRadioGroup) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SettingsMenu) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SimpleConfirmationDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SiteDataTest) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SiteDetailsPermission) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SiteDetailsPermissionDeviceEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SiteEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SiteFavicon) {}

#if BUILDFLAG(IS_CHROMEOS_ASH)
// Copied from Polymer 2 test. TODO(crbug.com/41439813): flaky, fix.
IN_PROC_BROWSER_TEST_F(SettingsTest, DISABLED_SiteListChromeOS) {
  RunTest("settings/site_list_tests_cros.js", "mocha.run()");
}
#endif

IN_PROC_BROWSER_TEST_F(SettingsTest, SiteListEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, Slider) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, SpeedPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, StartupUrlsPage) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, StorageAccessStaticSiteListEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, StorageAccessSiteListEntry) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, StorageAccessSiteList) {}
// Flaky on all OSes. TODO(crbug.com/40825327): Enable the test.
IN_PROC_BROWSER_TEST_F(SettingsTest, DISABLED_Subpage) {}

#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsTest, SyncAccountControl) {}
#endif


IN_PROC_BROWSER_TEST_F(SettingsTest, TabDiscardExceptionDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ToggleButton) {}

#if BUILDFLAG(ENABLE_COMPOSE)
IN_PROC_BROWSER_TEST_F(SettingsTest, OfferWritingHelpPage) {}
#endif  // BUILDFLAG(ENABLE_COMPOSE)

IN_PROC_BROWSER_TEST_F(SettingsTest, ZoomLevels) {}

#if !BUILDFLAG(IS_CHROMEOS)
class SettingsSystemPageTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsSystemPageTest, SystemPage) {}
#endif

SettingsAboutPageTest;

IN_PROC_BROWSER_TEST_F(SettingsAboutPageTest, AllBuilds) {}

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
IN_PROC_BROWSER_TEST_F(SettingsAboutPageTest, OfficialBuild) {
  RunTest("settings/about_page_test.js", "runMochaSuite('OfficialBuild')");
}
#endif

SettingsAllSitesTest;

IN_PROC_BROWSER_TEST_F(SettingsAllSitesTest, EnableRelatedWebsiteSets) {}

IN_PROC_BROWSER_TEST_F(SettingsAllSitesTest, DisableRelatedWebsiteSets) {}

class SettingsBasicPageTest : public SettingsBrowserTest {};

// TODO(crbug.com/40823128): Flaky on all platforms.
IN_PROC_BROWSER_TEST_F(SettingsBasicPageTest, DISABLED_BasicPage) {}

IN_PROC_BROWSER_TEST_F(SettingsBasicPageTest, PrivacyGuidePromo) {}

IN_PROC_BROWSER_TEST_F(SettingsBasicPageTest, Performance) {}

IN_PROC_BROWSER_TEST_F(SettingsBasicPageTest, SafetyHubDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsBasicPageTest, ExperimentalAdvanced) {}

SettingsClearBrowsingDataTest;

// TODO(crbug.com/40707011): Flaky on Mac.
#if BUILDFLAG(IS_MAC)
#define MAYBE_ClearBrowsingDataAllPlatforms
#else
#define MAYBE_ClearBrowsingDataAllPlatforms
#endif
IN_PROC_BROWSER_TEST_F(SettingsClearBrowsingDataTest,
                       MAYBE_ClearBrowsingDataAllPlatforms) {}

#if !BUILDFLAG(IS_CHROMEOS_ASH)
IN_PROC_BROWSER_TEST_F(SettingsClearBrowsingDataTest,
                       ClearBrowsingDataDesktop) {}
#endif

IN_PROC_BROWSER_TEST_F(SettingsClearBrowsingDataTest,
                       CbdTimeRangeExperiment_ExperimentOn) {}

IN_PROC_BROWSER_TEST_F(SettingsClearBrowsingDataTest,
                       CbdTimeRangeExperiment_ExperimentOff) {}

IN_PROC_BROWSER_TEST_F(SettingsClearBrowsingDataTest,
                       ClearBrowsingDataForSupervisedUsers) {}

class SettingsCookiesPageTest : public SettingsBrowserTest {};

#if ((BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS)) && !defined(NDEBUG)) || \
    BUILDFLAG(IS_MAC)
#define MAYBE_CookiesPageTest
#else
#define MAYBE_CookiesPageTest
#endif
// TODO(crbug.com/40889245): fix flakiness on Linux and ChromeOS debug builds
// and re-enable.
IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, MAYBE_CookiesPageTest) {}

IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, ExceptionsList) {}

IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, FirstPartySetsUIDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, TrackingProtectionSettings) {}

IN_PROC_BROWSER_TEST_F(SettingsCookiesPageTest, ActSettings) {}

// Test with --enable-pixel-output-in-tests enabled, required by fingerprint
// element test using HTML canvas.
class SettingsWithPixelOutputTest : public SettingsBrowserTest {};

// https://crbug.com/1044390 - maybe flaky on Mac?
#if BUILDFLAG(IS_MAC)
#define MAYBE_FingerprintProgressArc
#else
#define MAYBE_FingerprintProgressArc
#endif
IN_PROC_BROWSER_TEST_F(SettingsWithPixelOutputTest,
                       MAYBE_FingerprintProgressArc) {}

#if !BUILDFLAG(IS_CHROMEOS_ASH)
SettingsLanguagePageTest;

IN_PROC_BROWSER_TEST_F(SettingsLanguagePageTest, AddLanguagesDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsLanguagePageTest, LanguageMenu) {}

IN_PROC_BROWSER_TEST_F(SettingsLanguagePageTest, MetricsBrowser) {}
#endif

SettingsPerformancePageTest;

IN_PROC_BROWSER_TEST_F(SettingsPerformancePageTest, TabDiscardExceptionList) {}

IN_PROC_BROWSER_TEST_F(SettingsBrowserTest, DiscardIndicator) {}

class SettingsPerformancePagePerformanceInterventionTest
    : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsPerformancePagePerformanceInterventionTest,
                       PerformanceIntervention) {}

SettingsMemoryPageTest;

IN_PROC_BROWSER_TEST_F(SettingsMemoryPageTest, MemorySaver) {}

IN_PROC_BROWSER_TEST_F(SettingsBrowserTest, MemorySaverAggressiveness) {}

class SettingsPersonalizationOptionsTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsPersonalizationOptionsTest, AllBuilds) {}

IN_PROC_BROWSER_TEST_F(SettingsPersonalizationOptionsTest,
                       PageContentSettingOff) {}

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
IN_PROC_BROWSER_TEST_F(SettingsPersonalizationOptionsTest, OfficialBuild) {
  RunTest("settings/personalization_options_test.js",
          "runMochaSuite('OfficialBuild')");
}
#endif

// Privacy guide page tests.
class SettingsPrivacyGuideTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, PrivacyGuidePage) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, FlowLength) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, MsbbCardNavigations) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, HistorySyncCardNavigations) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, afeBrowsingCardNavigations) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, CookiesCardNavigations) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, AdTopicsCardNavigations) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, PrivacyGuideDialog) {}

// TODO(crbug.com/40942110): Re-enable when no longer flaky.
#if (BUILDFLAG(IS_LINUX) && !defined(NDEBUG))
#define MAYBE_3pcdOff
#else
#define MAYBE_3pcdOff
#endif
IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, MAYBE_3pcdOff) {}

// Privacy guide integration tests.
// TODO(crbug.com/40899379): Re-enable when no longer flaky.
#if (BUILDFLAG(IS_LINUX) && !defined(NDEBUG))
#define MAYBE_Integration
#else
#define MAYBE_Integration
#endif
IN_PROC_BROWSER_TEST_F(SettingsBrowserTest, MAYBE_Integration) {}

// Privacy guide fragment tests.
IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, WelcomeFragment) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, MsbbFragment) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, HistorySyncFragment) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, SafeBrowsingFragment) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, CookiesFragment) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, CompletionFragment) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest,
                       CompletionFragmentPrivacySandboxRestricted) {}

IN_PROC_BROWSER_TEST_F(
    SettingsPrivacyGuideTest,
    CompletionFragmentPrivacySandboxRestrictedWithNoticeEnabled) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest,
                       CompletionFragmentWithAdTopicsCard) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyGuideTest, AdTopicsFragment) {}

class SettingsPrivacyPagePrivacySandboxRestrictedTest
    : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPagePrivacySandboxRestrictedTest,
                       Restricted) {}

class SettingsPrivacyPagePrivacySandboxRestrictedWithNoticeTest
    : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(
    SettingsPrivacyPagePrivacySandboxRestrictedWithNoticeTest,
    RestrictedWithNotice) {}

class SettingsPrivacyPageTest : public SettingsBrowserTest {};

// TODO(crbug.com/40285326): This fails with the field trial testing config.
class SettingsPrivacyPageTestNoTestingConfig : public SettingsPrivacyPageTest {};

// Tests that the content settings page for Web Printing is not shown by
// default.
class SettingsPrivacyPageTestWithoutWebPrinting : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTestWithoutWebPrinting,
                       WebPrintingNotShown) {}

// Flaky on linux debug builds. https://crbug.com/331366001.
#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG)
#define MAYBE_PrivacyPage
#else
#define MAYBE_PrivacyPage
#endif
IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTestNoTestingConfig,
                       MAYBE_PrivacyPage) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, PrivacySandbox) {}

#if BUILDFLAG(USE_NSS_CERTS)
IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, CertificateManagementV2) {}
#endif  // BUILDFLAG(USE_NSS_CERTS)

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, CookiesSubpage) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, TrackingProtectionSubpage) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, PrivacyGuideRow) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, NotificationPermissionReview) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest,
                       NotificationPermissionReviewSafetyHubDisabled) {}

// TODO(crbug.com/40669164): flaky crash on Linux Tests (dbg).
IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, DISABLED_PrivacyPageSound) {}

// TODO(crbug.com/40710522): flaky failure on multiple platforms
IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest,
                       DISABLED_HappinessTrackingSurveys) {}

#if BUILDFLAG(IS_MAC) || BUILDFLAG(IS_WIN)
// TODO(crbug.com/40669164): disabling due to failures on several builders.
IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest, DISABLED_CertificateManager) {
  RunTest("settings/privacy_page_test.js",
          "runMochaSuite('NativeCertificateManager')");
}
#endif

IN_PROC_BROWSER_TEST_F(SettingsPrivacyPageTest,
                       EnableWebBluetoothNewPermissionsBackend) {}

class SettingsPrivacySandboxPageTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest, PrivacySandboxPage) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest, RestrictedEnabled) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest,
                       TopicsSubpageWithProactiveTopicsBlockingDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest,
                       TopicsSubpageEmptyWithProactiveTopicsBlockingDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest,
                       FledgeSubpageWithProactiveTopicsBlockingDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest, FledgeSubpageEmpty) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest,
                       FledgeSubpageSeeAllSites) {}

IN_PROC_BROWSER_TEST_F(SettingsPrivacySandboxPageTest, AdMeasurementSubpage) {}

class ProactiveTopicsBlockingTest : public SettingsPrivacySandboxPageTest {};

IN_PROC_BROWSER_TEST_F(ProactiveTopicsBlockingTest,
                       TopicsSubpageWithProactiveTopicsBlockingEnabled) {}

IN_PROC_BROWSER_TEST_F(ProactiveTopicsBlockingTest, ManageTopics) {}

IN_PROC_BROWSER_TEST_F(ProactiveTopicsBlockingTest,
                       FledgeSubpageWithProactiveTopicsBlockingEnabled) {}

IN_PROC_BROWSER_TEST_F(ProactiveTopicsBlockingTest,
                       ManageTopicsAndAdTopicsPageState) {}

class PrivacySandboxPageRedesign : public SettingsPrivacySandboxPageTest {};

IN_PROC_BROWSER_TEST_F(PrivacySandboxPageRedesign, RedesignToggles) {}

IN_PROC_BROWSER_TEST_F(SettingsTest, ReviewNotificationPermissions) {}

SettingsRouteTest;

IN_PROC_BROWSER_TEST_F(SettingsRouteTest, Basic) {}

IN_PROC_BROWSER_TEST_F(SettingsRouteTest, DynamicParameters) {}

IN_PROC_BROWSER_TEST_F(SettingsRouteTest, SafetyHubReachable) {}

IN_PROC_BROWSER_TEST_F(SettingsRouteTest, SafetyHubNotReachable) {}

// Copied from Polymer 2 test:
// Failing on ChromiumOS dbg. https://crbug.com/709442
#if (BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS_ASH)) && !defined(NDEBUG)
#define MAYBE_NonExistentRoute
#else
#define MAYBE_NonExistentRoute
#endif
IN_PROC_BROWSER_TEST_F(SettingsRouteTest, MAYBE_NonExistentRoute) {}

#if BUILDFLAG(ENABLE_EXTENSIONS)
class SettingsSafetyCheckPermissionsTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsSafetyCheckPermissionsTest, All) {}
#endif

class SettingsSafetyHubTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsSafetyHubTest, SafetyHubCard) {}

IN_PROC_BROWSER_TEST_F(SettingsSafetyHubTest, SafetyHubEntryPoint) {}

IN_PROC_BROWSER_TEST_F(SettingsSafetyHubTest, SafetyHubModule) {}

#if BUILDFLAG(USE_JAVASCRIPT_COVERAGE)
// TODO(crbug.com/41496635): Webviews don't work properly with JS coverage.
#define MAYBE_SafetyHubPage
#else
#define MAYBE_SafetyHubPage
#endif
IN_PROC_BROWSER_TEST_F(SettingsSafetyHubTest, MAYBE_SafetyHubPage) {}

IN_PROC_BROWSER_TEST_F(SettingsSafetyHubTest, UnusedSitePermissionsModule) {}

IN_PROC_BROWSER_TEST_F(SettingsSafetyHubTest, NotificationPermissionsModule) {}

IN_PROC_BROWSER_TEST_F(SettingsSafetyHubTest, SafetyHubExtensions) {}

class SettingsSecurityPageTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsSecurityPageTest, Main) {}

IN_PROC_BROWSER_TEST_F(SettingsSecurityPageTest, FlagsDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsSecurityPageTest,
                       SecurityPageHappinessTrackingSurveys) {}

// TODO(crbug/338155508): Enable this flaky test. This is flaky on Linux debug
// build.
#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG)
#define MAYBE_SafeBrowsing
#else
#define MAYBE_SafeBrowsing
#endif
IN_PROC_BROWSER_TEST_F(SettingsSecurityPageTest, MAYBE_SafeBrowsing) {}

#if !BUILDFLAG(IS_CHROMEOS_ASH)
SettingsSpellCheckPageTest;

IN_PROC_BROWSER_TEST_F(SettingsSpellCheckPageTest, AllBuilds) {}

IN_PROC_BROWSER_TEST_F(SettingsSpellCheckPageTest, Metrics) {}

#if !BUILDFLAG(IS_MAC)
IN_PROC_BROWSER_TEST_F(SettingsSpellCheckPageTest, MetricsNotMacOS) {}
#endif

#if BUILDFLAG(GOOGLE_CHROME_BRANDING)
IN_PROC_BROWSER_TEST_F(SettingsSpellCheckPageTest, MetricsOfficialBuild) {
  RunTest("settings/spell_check_page_metrics_test_browser.js",
          "runMochaSuite('SpellCheckPageMetricsBrowser MetricsOfficialBuild')");
}

IN_PROC_BROWSER_TEST_F(SettingsSpellCheckPageTest, OfficialBuild) {
  RunTest("settings/spell_check_page_test.js",
          "runMochaSuite('SpellCheck OfficialBuild')");
}
#endif  // BUILDFLAG(GOOGLE_CHROME_BRANDING)
#endif  // !BUILDFLAG(IS_CHROMEOS_ASH)

class SettingsSiteDetailsTest : public SettingsBrowserTest {};

// Disabling on debug due to flaky timeout on Win7 Tests (dbg)(1) bot.
// https://crbug.com/825304 - later for other platforms in crbug.com/1021219.
#if !defined(NDEBUG)
#define MAYBE_SiteDetails
#else
#define MAYBE_SiteDetails
#endif
IN_PROC_BROWSER_TEST_F(SettingsSiteDetailsTest, MAYBE_SiteDetails) {}

class SettingsSiteListTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, SiteList) {}

// TODO(crbug.com/929455, crbug.com/1064002): Flaky test. When it is fixed,
// merge SiteListDisabled back into SiteList.
IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, DISABLED_SiteListDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, SiteListEmbargoedOrigin) {}

// TODO(crbug.com/41439813): When the bug is fixed, merge
// SiteListCookiesExceptionTypes into SiteList.
IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, SiteListCookiesExceptionTypes) {}

IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, SiteListSearchTests) {}

IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, EditExceptionDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsSiteListTest, AddExceptionDialog) {}

class SettingsSiteSettingsPageTest : public SettingsBrowserTest {};

// TODO(crbug.com/40884439): Flaky.
#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG)
#define MAYBE_SiteSettingsPage
#else
#define MAYBE_SiteSettingsPage
#endif
IN_PROC_BROWSER_TEST_F(SettingsSiteSettingsPageTest, MAYBE_SiteSettingsPage) {}

// TODO(crbug.com/40884439): Flaky.
#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG)
#define MAYBE_UnusedSitePermissionsReview
#else
#define MAYBE_UnusedSitePermissionsReview
#endif
IN_PROC_BROWSER_TEST_F(SettingsSiteSettingsPageTest,
                       MAYBE_UnusedSitePermissionsReview) {}

// TODO(crbug.com/40884439): Flaky.
#if BUILDFLAG(IS_LINUX) && !defined(NDEBUG)
#define MAYBE_UnusedSitePermissionsReviewDisabled
#else
#define MAYBE_UnusedSitePermissionsReviewDisabled
#endif
IN_PROC_BROWSER_TEST_F(SettingsSiteSettingsPageTest,
                       MAYBE_UnusedSitePermissionsReviewDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsSiteSettingsPageTest,
                       UnusedSitePermissionsReviewSafetyHubDisabled) {}

IN_PROC_BROWSER_TEST_F(SettingsSiteSettingsPageTest, SafetyHubDisabled) {}

IN_PROC_BROWSER_TEST_F(
    SettingsSiteSettingsPageTest,
    AbusiveNotificationsEnabledUnusedSitePermissionsDisabled) {}

#if !BUILDFLAG(IS_CHROMEOS_ASH)
SettingsTranslatePageTest;

IN_PROC_BROWSER_TEST_F(SettingsTranslatePageTest, TranslateSettings) {}

IN_PROC_BROWSER_TEST_F(SettingsTranslatePageTest, AlwaysTranslateDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsTranslatePageTest, NeverTranslateDialog) {}

IN_PROC_BROWSER_TEST_F(SettingsTranslatePageTest, MetricsBrowser) {}
#endif  // !BUILDFLAG(IS_CHROMEOS_ASH)

class SettingsUnusedSitePermissionsTest : public SettingsBrowserTest {};

IN_PROC_BROWSER_TEST_F(SettingsUnusedSitePermissionsTest, All) {}