diff --git a/chromium_src/chrome/browser/ssl/https_upgrades_browsertest.cc b/chromium_src/chrome/browser/ssl/https_upgrades_browsertest.cc index d0ab3f92df7..dbc4277fc3f 100644 --- a/chromium_src/chrome/browser/ssl/https_upgrades_browsertest.cc +++ b/chromium_src/chrome/browser/ssl/https_upgrades_browsertest.cc @@ -5,11 +5,22 @@ #include "net/base/features.h" +// Prevent re-dfining ExpectTotalCount. +#include "base/test/metrics/histogram_tester.h" // Prevent re-defining InitWithFeatures definition. #include "base/test/scoped_feature_list.h" #define InitWithFeatures(...) \ InitWithFeaturesAndDisable(net::features::kBraveHttpsByDefault, __VA_ARGS__) +// Add one to total count for Brave extension +// (chrome-extension://mnojpmjdmbbfmejpflffifhffcmidifd/) background page. +#define ExpectTotalCount(NAME, COUNT) \ + ExpectTotalCount( \ + NAME, std::string_view(NAME) == kNavigationRequestSecurityLevelHistogram \ + ? COUNT + 1 \ + : COUNT) + #include "src/chrome/browser/ssl/https_upgrades_browsertest.cc" +#undef ExpectTotalCount #undef InitWithFeatures diff --git a/test/filters/browser_tests.filter b/test/filters/browser_tests.filter index 23cee8e8fd5..5cef23d5f88 100644 --- a/test/filters/browser_tests.filter +++ b/test/filters/browser_tests.filter @@ -1086,7 +1086,53 @@ -ProfileTypeChoiceUIPixelTest.InvokeUi_default/TS # These tests fail because we are modifying the HttpsUpgrades feature. --HttpsUpgradesBrowserTest.* +-HttpsUpgradesBrowserTest.AllowlistEntryExpires/* +-HttpsUpgradesBrowserTest.BadHttpsFollowedByGoodHttps/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.BadHttpsFollowedByGoodHttps/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.BrokenSSLOnUpgrade_SecurityLevelWarning/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.BrokenSSLOnUpgrade_SecurityLevelWarning/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.CloseInterstitialTab/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.CloseInterstitialTab/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.EnterpriseAllowlistDisablesHttpsFirstModeForSiteEngagament/AllAutoHFM +-HttpsUpgradesBrowserTest.EnterpriseAllowlistDisablesHttpsFirstModeForSiteEngagament/HttpsFirstModeWithSiteEngagement +-HttpsUpgradesBrowserTest.EnterpriseAllowlistDisablesUpgrades/* +-HttpsUpgradesBrowserTest.ExemptNetErrorOnUpgrade_ShouldNotFallback/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.ExemptNetErrorOnUpgrade_ShouldNotFallback/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.HttpPageHttpPost_NotUpgraded/* +-HttpsUpgradesBrowserTest.HttpParentHttpSubframeNavigation_NotUpgraded/* +-HttpsUpgradesBrowserTest.HttpsToHttpRedirect_ShouldUpgrade/* +-HttpsUpgradesBrowserTest.HttpsUpgradeWithBrokenSSL_ShouldTriggerSSLInterstitial/* +-HttpsUpgradesBrowserTest.IncognitoHasSeparateAllowlist/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.IncognitoInterstitialVariation/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.InterstitialBypassed_HttpFallbackLoaded/* +-HttpsUpgradesBrowserTest.InterstitialFallbackMaintainsHistory/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.InterstitialFallbackMaintainsHistory/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.InterstitialGoBack/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.InterstitialGoBack/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.InterstitialLearnMoreLink/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.InterstitialLearnMoreLink/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.Localhost_ShouldNotUpgrade/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.NetErrorOnUpgrade_SecurityLevelWarning/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.NetErrorOnUpgrade_SecurityLevelWarning/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.NetErrorOnUpgrade_ShouldInterstitial/* +-HttpsUpgradesBrowserTest.NonUniqueHost_RecordsMetrics/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.PreferHstsOverHttpsFirstMode/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.RedirectLoop_ShouldInterstitial/* +-HttpsUpgradesBrowserTest.RevisitingBumpsExpiration/* +-HttpsUpgradesBrowserTest.SlowHttps_ShouldInterstitial/* +-HttpsUpgradesBrowserTest.TogglingSettingClearsAllowlist/AllFeatures +-HttpsUpgradesBrowserTest.TogglingSettingClearsAllowlist/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.URLsAutocompletedWithHttpSchemeAreUpgraded/* +-HttpsUpgradesBrowserTest.URLsTypedWithHttpSchemeNoUpgrades/* +-HttpsUpgradesBrowserTest.URLsTypedWithHttpSchemeNoUpgradesAllowlist/* +-HttpsUpgradesBrowserTest.UrlWithHttpScheme_BrokenSSL_ShouldInterstitial/* +-HttpsUpgradesBrowserTest.UrlWithHttpScheme_BrokenSSL_ShouldInterstitial_TypicallySecureUser/* +-HttpsUpgradesBrowserTest.UrlWithHttpScheme_BrokenSSL_SiteEngagementHeuristic_ShouldIgnoreUrlsWithNonDefaultPorts/* +-HttpsUpgradesBrowserTest.UrlWithHttpScheme_BrokenSSL_SiteEngagementHeuristic_ShouldInterstitial/* +-HttpsUpgradesBrowserTest.UrlWithHttpScheme_NonUniqueHostname_ShouldNotInterstitial_TypicallySecureUser/HttpsFirstBalancedMode +-HttpsUpgradesBrowserTest.UrlWithHttpScheme_ShouldUpgrade/* +-HttpsUpgradesBrowserTest.UrlWithHttpsScheme_ShouldLoad/HttpsFirstModeIncognito +-HttpsUpgradesBrowserTest.crbug1431026/* -HttpsUpgradesPrefsBrowserTest.PrefStatesRecorded -HttpsUpgradesPrefsIncognitoEnabledBrowserTest.PrefStatesRecorded