#include <memory>
#include <string>
#include "base/command_line.h"
#include "base/test/bind.h"
#include "base/test/metrics/histogram_tester.h"
#include "build/build_config.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/browser/browser_main_loop.h"
#include "content/browser/sms/sms_fetcher_impl.h"
#include "content/browser/sms/test/mock_sms_provider.h"
#include "content/browser/sms/test/mock_sms_web_contents_delegate.h"
#include "content/browser/sms/webotp_service.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/sms_fetcher.h"
#include "content/public/common/content_switches.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/content_browser_test.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/content_mock_cert_verifier.h"
#include "content/public/test/fenced_frame_test_util.h"
#include "content/public/test/prerender_test_util.h"
#include "content/shell/browser/shell.h"
#include "content/test/content_browser_test_utils_internal.h"
#include "net/cert/mock_cert_verifier.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/default_handlers.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/common/sms/webotp_service_outcome.h"
SmsStatus;
_;
Invoke;
NiceMock;
Return;
namespace content {
UserConsent;
namespace {
class SmsBrowserTest : public ContentBrowserTest { … };
}
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG)
#define MAYBE_Receive …
#else
#define MAYBE_Receive …
#endif
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, MAYBE_Receive) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, AtMostOneSmsRequestPerOrigin) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest,
DISABLED_AtMostOneSmsRequestPerOriginPerTab) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, Reload) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, Close) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, DISABLED_TwoTabsSameOrigin) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, DISABLED_TwoTabsDifferentOrigin) { … }
#if BUILDFLAG(IS_WIN) && !defined(NDEBUG)
#define MAYBE_SmsReceivedAfterTabIsClosed …
#else
#define MAYBE_SmsReceivedAfterTabIsClosed …
#endif
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, MAYBE_SmsReceivedAfterTabIsClosed) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, AbortAfterSmsRetrieval) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, SmsFetcherUAF) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, UpdateRenderFrameHostWithWebOTPUsage) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, RecordBackendNotAvailableAsOutcome) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest,
NotRecordFailureForMultiplePendingOrigins) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, RecordSmsNotParsedMetrics) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, SmsParsed) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, RecordSmsParsedMetrics) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, TwoUniqueOrigins) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, ThreeUniqueOrigins) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, TwoUniqueOriginsConsecutive) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, TwoUniqueOriginsInconsecutive) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, RecordOutcomeWithCrossOriginFrame) { … }
IN_PROC_BROWSER_TEST_F(SmsBrowserTest, RecordOutcomeWithSameOriginFrame) { … }
class MockSmsPrerenderingWebContentsDelegate : public WebContentsDelegate { … };
class SmsPrerenderingBrowserTest : public SmsBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SmsPrerenderingBrowserTest,
WebOTPWorksAfterPrerenderActivation) { … }
class SmsFencedFrameBrowserTest : public SmsBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SmsFencedFrameBrowserTest,
DoNotRecordSmsMetricsOnFencedFrame) { … }
}