#include "components/safe_browsing/content/browser/safe_browsing_blocking_page.h"
#include <algorithm>
#include <map>
#include <memory>
#include <optional>
#include <string_view>
#include <utility>
#include "base/command_line.h"
#include "base/feature_list.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ptr_util.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/strings/strcat.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/simple_test_clock.h"
#include "base/test/test_future.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/app/chrome_command_ids.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/content_settings/host_content_settings_map_factory.h"
#include "chrome/browser/history/history_service_factory.h"
#include "chrome/browser/interstitials/security_interstitial_idn_test.h"
#include "chrome/browser/password_manager/password_manager_test_base.h"
#include "chrome/browser/password_manager/passwords_navigation_observer.h"
#include "chrome/browser/policy/dm_token_utils.h"
#include "chrome/browser/policy/policy_test_utils.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/renderer_context_menu/render_view_context_menu_test_util.h"
#include "chrome/browser/safe_browsing/chrome_safe_browsing_blocking_page_factory.h"
#include "chrome/browser/safe_browsing/safe_browsing_metrics_collector_factory.h"
#include "chrome/browser/safe_browsing/safe_browsing_navigation_observer_manager_factory.h"
#include "chrome/browser/safe_browsing/test_safe_browsing_service.h"
#include "chrome/browser/safe_browsing/url_lookup_service_factory.h"
#include "chrome/browser/safe_browsing/user_interaction_observer.h"
#include "chrome/browser/safe_browsing/verdict_cache_manager_factory.h"
#include "chrome/browser/ssl/cert_verifier_browser_test.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_commands.h"
#include "chrome/browser/ui/browser_tabstrip.h"
#include "chrome/browser/ui/hats/mock_trust_safety_sentiment_service.h"
#include "chrome/browser/ui/hats/trust_safety_sentiment_service_factory.h"
#include "chrome/browser/ui/safety_hub/safety_hub_util.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/browser/ui/views/frame/browser_view.h"
#include "chrome/browser/ui/views/location_bar/location_icon_view.h"
#include "chrome/browser/ui/views/page_info/page_info_bubble_view.h"
#include "chrome/browser/ui/views/page_info/page_info_bubble_view_base.h"
#include "chrome/browser/ui/views/page_info/page_info_view_factory.h"
#include "chrome/browser/ui/views/toolbar/toolbar_view.h"
#include "chrome/common/chrome_features.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/enterprise/connectors/core/common.h"
#include "components/enterprise/connectors/core/connectors_prefs.h"
#include "components/google/core/common/google_util.h"
#include "components/grit/components_resources.h"
#include "components/omnibox/browser/omnibox_prefs.h"
#include "components/page_info/core/features.h"
#include "components/permissions/permission_util.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/core/common/policy_types.h"
#include "components/policy/policy_constants.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/content/browser/async_check_tracker.h"
#include "components/safe_browsing/content/browser/safe_browsing_blocking_page_factory.h"
#include "components/safe_browsing/content/browser/threat_details.h"
#include "components/safe_browsing/content/browser/ui_manager.h"
#include "components/safe_browsing/content/browser/unsafe_resource_util.h"
#include "components/safe_browsing/content/common/safe_browsing.mojom.h"
#include "components/safe_browsing/core/browser/db/database_manager.h"
#include "components/safe_browsing/core/browser/db/fake_database_manager.h"
#include "components/safe_browsing/core/browser/db/util.h"
#include "components/safe_browsing/core/browser/db/v4_protocol_manager_util.h"
#include "components/safe_browsing/core/browser/safe_browsing_metrics_collector.h"
#include "components/safe_browsing/core/browser/verdict_cache_manager.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/hashprefix_realtime/hash_realtime_utils.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "components/safe_browsing/core/common/web_ui_constants.h"
#include "components/security_interstitials/content/security_interstitial_controller_client.h"
#include "components/security_interstitials/content/security_interstitial_tab_helper.h"
#include "components/security_interstitials/content/ssl_blocking_page.h"
#include "components/security_interstitials/core/controller_client.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "components/security_interstitials/core/unsafe_resource.h"
#include "components/security_interstitials/core/urls.h"
#include "components/security_state/content/security_state_tab_helper.h"
#include "components/security_state/core/security_state.h"
#include "components/strings/grit/components_strings.h"
#include "components/ukm/test_ukm_recorder.h"
#include "components/unified_consent/pref_names.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/disallow_activation_reason.h"
#include "content/public/browser/navigation_controller.h"
#include "content/public/browser/navigation_entry.h"
#include "content/public/browser/render_frame_host.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/isolated_world_ids.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/prerender_test_util.h"
#include "content/public/test/render_view_test.h"
#include "content/public/test/test_frame_navigation_observer.h"
#include "content/public/test/test_navigation_observer.h"
#include "content/public/test/test_utils.h"
#include "net/cert/cert_verify_result.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "net/test/url_request/url_request_mock_http_job.h"
#include "services/network/public/cpp/shared_url_loader_factory.h"
#include "services/network/public/mojom/fetch_api.mojom.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
#include "third_party/blink/public/common/features.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/base/window_open_disposition.h"
#include "ui/events/test/test_event.h"
#include "ui/views/controls/styled_label.h"
#if BUILDFLAG(IS_CHROMEOS_ASH)
#include "chrome/browser/metrics/desktop_session_duration/desktop_session_duration_tracker.h"
#endif
SecurityInterstitialIDNTest;
BrowserThread;
NavigationController;
RenderFrameHost;
WebContents;
BaseSafeBrowsingErrorUI;
namespace safe_browsing {
namespace {
const char kEmptyPage[] = …;
const char kHTTPSPage[] = …;
const char kMaliciousPage[] = …;
const char kCrossSiteMaliciousPage[] = …;
const char kMaliciousIframe[] = …;
const char kRedirectToMalware[] = …;
const char kUnrelatedUrl[] = …;
const char kEnhancedProtectionUrl[] = …;
const char kMaliciousJsPage[] = …;
const char kMaliciousJs[] = …;
const char kInterstitialCloseHistogram[] = …;
const char kInterstitialPreCommitPageHistogramSuffix[] = …;
std::string GetHistogramPrefix(const SBThreatType& threat_type) { … }
}
enum Visibility { … };
bool IsShowingInterstitial(WebContents* contents) { … }
content::RenderFrameHost* GetRenderFrameHost(Browser* browser) { … }
views::BubbleDialogDelegateView* OpenPageInfo(Browser* browser) { … }
bool WaitForReady(Browser* browser) { … }
Visibility GetVisibility(Browser* browser, const std::string& node_id) { … }
bool Click(Browser* browser, const std::string& node_id) { … }
bool ClickAndWaitForDetach(Browser* browser, const std::string& node_id) { … }
void ExpectSecurityIndicatorDowngrade(content::WebContents* tab,
net::CertStatus cert_status) { … }
void ExpectNoSecurityIndicatorDowngrade(content::WebContents* tab) { … }
class FakeSafeBrowsingUIManager : public TestSafeBrowsingUIManager { … };
class TestThreatDetailsFactory : public ThreatDetailsFactory { … };
class TestSafeBrowsingBlockingPage : public SafeBrowsingBlockingPage { … };
void AssertNoInterstitial(Browser* browser) { … }
class TestSafeBrowsingBlockingPageFactory
: public SafeBrowsingBlockingPageFactory { … };
class SafeBrowsingBlockingPageTestHelper { … };
class SafeBrowsingBlockingPageBrowserTest
: public CertVerifierBrowserTest,
public testing::WithParamInterface<testing::tuple<SBThreatType, bool>> { … };
class SafeBrowsingHatsSurveyBrowserTest
: public SafeBrowsingBlockingPageBrowserTest { … };
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, HardcodedUrls) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, DontProceed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, DontProceed_RTL) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, Proceed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, Proceed_RTL) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, IframeNoWarning) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, JsNoWarning) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
MainFrameBlockedShouldHaveNoDOMDetailsWhenDontProceed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
MainFrameBlockedShouldHaveNoDOMDetailsWhenProceeding) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, ProceedDisabled) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, NoBackToSafety) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
ReportingDisabledByPolicy) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
ReloadWhileInterstitialShowing) { … }
#if (BUILDFLAG(IS_MAC) && !defined(NDEBUG)) || defined(MEMORY_SANITIZER)
#define MAYBE_LearnMore …
#else
#define MAYBE_LearnMore …
#endif
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, MAYBE_LearnMore) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
Histograms_DontProceed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
Histograms_Proceed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
Histograms_UserMadeNoDecision) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, AllowlistRevisit) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest, AllowlistUnsaved) { … }
#if (BUILDFLAG(IS_MAC) && !defined(NDEBUG)) || defined(MEMORY_SANITIZER)
#define MAYBE_VerifyHitReportSentOnSBERAndNotIncognito …
#else
#define MAYBE_VerifyHitReportSentOnSBERAndNotIncognito …
#endif
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
MAYBE_VerifyHitReportSentOnSBERAndNotIncognito) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
VerifyHitReportNotSentOnIncognito) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
VerifyHitReportNotSentWithoutSBER) { … }
namespace {
class SecurityStyleTestObserver : public content::WebContentsObserver { … };
}
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
SecurityStateGoBack) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
SecurityState_HTTP) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
SecurityState_ValidHTTPS) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
SecurityState_InvalidHTTPS) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
VerifyEnterpriseAllowlist) { … }
INSTANTIATE_TEST_SUITE_P(…);
#if (BUILDFLAG(IS_MAC) && !defined(NDEBUG)) || defined(MEMORY_SANITIZER)
#define MAYBE_NavigatingBackAndForth …
#else
#define MAYBE_NavigatingBackAndForth …
#endif
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
MAYBE_NavigatingBackAndForth) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
TimestampInCSBRRClickedThroughBlockingPage) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
FallbackCSBRRSentWithExpectedFieldsPopulated) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageBrowserTest,
IgnoreFutureAutoRevocation) { … }
class AntiPhishingTelemetryBrowserTest
: public SafeBrowsingBlockingPageBrowserTest { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(AntiPhishingTelemetryBrowserTest,
CheckReportListsInteractions) { … }
IN_PROC_BROWSER_TEST_P(AntiPhishingTelemetryBrowserTest,
CheckReportCloseTabOnInterstitial) { … }
IN_PROC_BROWSER_TEST_P(
AntiPhishingTelemetryBrowserTest,
CheckReportListsInteractionsNoExplicitInterstitialDecision) { … }
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SafeBrowsingHatsSurveyBrowserTest,
ReportNotSentToSbButAttachedForHats) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingHatsSurveyBrowserTest,
ReportSentToSbAndAttachedForHats) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingHatsSurveyBrowserTest,
NoHatsSurveyWhenProceedDisabled) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingHatsSurveyBrowserTest,
NoHatsSurveyWhenSafeBrowsingSurveysDisabled) { … }
class TrustSafetySentimentSurveyV2BrowserTest
: public SafeBrowsingBlockingPageBrowserTest { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(TrustSafetySentimentSurveyV2BrowserTest,
TrustSafetySentimentTriggerredOnProceed) { … }
IN_PROC_BROWSER_TEST_P(TrustSafetySentimentSurveyV2BrowserTest,
TrustSafetySentimentTriggerredOnPrimaryButtonClick) { … }
IN_PROC_BROWSER_TEST_P(TrustSafetySentimentSurveyV2BrowserTest,
TrustSafetySentimentTriggeredOnCloseInterstitialTab) { … }
RedInterstitialUIBrowserTest;
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(RedInterstitialUIBrowserTest,
TestInterstitialPageStringsEnhancedEnabled) { … }
IN_PROC_BROWSER_TEST_P(RedInterstitialUIBrowserTest,
TestInterstitialPageStringsStandardEnabled) { … }
class SafeBrowsingBlockingPageDelayedWarningBrowserTest
: public InProcessBrowserTest,
public testing::WithParamInterface<
testing::tuple<bool ,
bool >> { … };
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
NoInteraction_WarningNotShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
NotPhishing_WarningNotDelayed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
CloseTab_ShouldNotCrash) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
KeyPress_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
KeyPress_ESC_WarningNotShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
KeyPress_ModifierKey_WarningNotShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
KeyPress_CtrlC_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
KeyPress_ESCAndCharacterKey_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
DISABLED_Fullscreen_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
PermissionRequest_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
JavaScriptDialog_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
DesktopCaptureRequest_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
Paste_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
MouseClick_WarningNotShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
MouseClick_WarningShown) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
Download_CancelledWithNoInterstitial) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
InteractionAfterNonCommittingNavigation_Interstitial) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageDelayedWarningBrowserTest,
PasswordSaveDisabled) { … }
INSTANTIATE_TEST_SUITE_P(…);
class SafeBrowsingBlockingPageIDNTest
: public SecurityInterstitialIDNTest,
public testing::WithParamInterface<SBThreatType> { … };
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageIDNTest,
DISABLED_SafeBrowsingBlockingPageDecodesIDN) { … }
INSTANTIATE_TEST_SUITE_P(…);
class SafeBrowsingBlockingPageEnhancedProtectionMessageTest
: public policy::PolicyTest { … };
IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageEnhancedProtectionMessageTest,
VerifyEnhancedProtectionMessageShownAndClicked) { … }
IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageEnhancedProtectionMessageTest,
VerifyEnhancedProtectionMessageNotShownAlreadyInEp) { … }
IN_PROC_BROWSER_TEST_F(SafeBrowsingBlockingPageEnhancedProtectionMessageTest,
VerifyEnhancedProtectionMessageNotShownManaged) { … }
class SafeBrowsingBlockingPageAsyncChecksTestBase
: public InProcessBrowserTest { … };
class SafeBrowsingBlockingPageAsyncChecksTest
: public SafeBrowsingBlockingPageAsyncChecksTestBase,
public testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTest,
EnterpriseRealTimeUrlCheck) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTest,
ConsumerRealTimeUrlCheck) { … }
class SafeBrowsingBlockingPageAsyncChecksTimingTestBase
: public SafeBrowsingBlockingPageAsyncChecksTestBase { … };
class SafeBrowsingBlockingPageAsyncChecksTimingTest
: public SafeBrowsingBlockingPageAsyncChecksTimingTestBase,
public testing::WithParamInterface<bool> { … };
class SafeBrowsingBlockingPageAsyncChecksPrerenderingTest
: public SafeBrowsingBlockingPageAsyncChecksTimingTestBase { … };
IN_PROC_BROWSER_TEST_F(
SafeBrowsingBlockingPageAsyncChecksPrerenderingTest,
PostCommitInterstitialReportThreatDetails_DontContainPrerenderingInfo) { … }
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
VerifyHistogramsAndHitReport) { … }
IN_PROC_BROWSER_TEST_P(
SafeBrowsingBlockingPageAsyncChecksTimingTest,
NoDuplicateHitReports_FallbackFromHighConfidenceAllowlistMatch) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
NoDuplicateHitReports_UrlRealTimeUncheckable) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
NoDuplicateHitReports_WebUiUrl) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
PostCommitInterstitialDontProceed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
PostCommitInterstitialProceed) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
PostCommitInterstitialServerRedirect_OriginIsUnsafe) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
PostCommitInterstitialServerRedirect_RedirectIsUnsafe) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
PostCommitInterstitialReportThreatDetails) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
PostCommitInterstitialAllowlistRevisit) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
SecurityStateDowngradedForPostCommitInterstitial) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
SecurityStateGoBackOnPostCommitInterstitial) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageAsyncChecksTimingTest,
SecurityStateGoBackFlaggedByBothChecks) { … }
#if BUILDFLAG(IS_LINUX) && defined(MEMORY_SANITIZER)
#define MAYBE_PostCommitInterstitialProceedAfterPreCommitInterstitial …
#else
#define MAYBE_PostCommitInterstitialProceedAfterPreCommitInterstitial …
#endif
IN_PROC_BROWSER_TEST_P(
SafeBrowsingBlockingPageAsyncChecksTimingTest,
MAYBE_PostCommitInterstitialProceedAfterPreCommitInterstitial) { … }
class SafeBrowsingBlockingPageRealTimeUrlCheckTest
: public InProcessBrowserTest,
public testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageRealTimeUrlCheckTest,
WarningShown_EnhancedProtectionEnabled) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageRealTimeUrlCheckTest,
WarningShown_MbbEnabled) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageRealTimeUrlCheckTest,
WarningNotShown_MbbDisabled) { … }
class SafeBrowsingBlockingPageHashRealTimeCheckTest
: public InProcessBrowserTest,
public testing::WithParamInterface<bool> { … };
class SafeBrowsingBlockingPageHashRealTimeCheckFeatureOffTest
: public SafeBrowsingBlockingPageHashRealTimeCheckTest { … };
INSTANTIATE_TEST_SUITE_P(…);
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageHashRealTimeCheckTest,
ShowWarning) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageHashRealTimeCheckTest,
DontShowWarning_PageIsSafe) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageHashRealTimeCheckFeatureOffTest,
DontShowWarning_FeatureIsOff) { … }
IN_PROC_BROWSER_TEST_P(SafeBrowsingBlockingPageHashRealTimeCheckTest,
TriggerHitReportAndClientSafeBrowsingReportRequest) { … }
class SafeBrowsingPrerenderBrowserTest
: public SafeBrowsingBlockingPageBrowserTest { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(SafeBrowsingPrerenderBrowserTest, UnsafePrerender) { … }
class SafeBrowsingBlockingPageDelayedWarningPrerenderingBrowserTest
: public SafeBrowsingBlockingPageDelayedWarningBrowserTest { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(
SafeBrowsingBlockingPageDelayedWarningPrerenderingBrowserTest,
DoNotRecordMetricsInPrerendering) { … }
class WarningShownTimestampCSBRRDisabledBrowserTest
: public SafeBrowsingBlockingPageBrowserTest { … };
INSTANTIATE_TEST_SUITE_P(…);
IN_PROC_BROWSER_TEST_P(WarningShownTimestampCSBRRDisabledBrowserTest,
TimestampNotInCSBRRClickedThroughBlockingPage) { … }
IN_PROC_BROWSER_TEST_P(WarningShownTimestampCSBRRDisabledBrowserTest,
TimestampNotInFallbackCSBRRSent) { … }
}