#include "chrome/browser/page_load_metrics/observers/security_state_page_load_metrics_observer.h"
#include <memory>
#include "base/feature_list.h"
#include "base/run_loop.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/metrics/histogram_tester.h"
#include "base/test/scoped_feature_list.h"
#include "chrome/browser/lookalikes/lookalike_test_helper.h"
#include "chrome/browser/lookalikes/safety_tip_web_contents_observer.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/tabs/tab_enums.h"
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/test/base/in_process_browser_test.h"
#include "chrome/test/base/ui_test_utils.h"
#include "components/lookalikes/core/safety_tip_test_utils.h"
#include "components/ukm/test_ukm_recorder.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/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/public/test/test_utils.h"
#include "net/dns/mock_host_resolver.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/metrics/public/cpp/ukm_builders.h"
#include "services/metrics/public/cpp/ukm_source.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "ui/base/window_open_disposition.h"
#include "url/gurl.h"
UkmEntry;
class SecurityStyleTestObserver : public content::WebContentsObserver { … };
class SecurityStatePageLoadMetricsBrowserTest : public InProcessBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest, Simple_Https) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest, Simple_Http) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest, ReloadPage) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest,
SafetyTipSiteEngagement) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest,
ReloadPageWithSafetyTip) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest, OtherScheme) { … }
class SecurityStatePageLoadMetricsBrowserTestWithAutoupgradesDisabled
: public SecurityStatePageLoadMetricsBrowserTest { … };
IN_PROC_BROWSER_TEST_F(
SecurityStatePageLoadMetricsBrowserTestWithAutoupgradesDisabled,
MixedContent) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest,
UncommittedLoadWithError) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest,
HostDoesNotExist) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest,
SafetyTipHostDoesNotExist) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest,
Navigate_Both_NonHtmlMainResource) { … }
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsBrowserTest,
NonZeroForegroundTime) { … }
class SecurityStatePageLoadMetricsMPArchBrowserTest
: public SecurityStatePageLoadMetricsBrowserTest { … };
class SecurityStatePageLoadMetricsPrerenderBrowserTest
: public SecurityStatePageLoadMetricsMPArchBrowserTest { … };
IN_PROC_BROWSER_TEST_F(
SecurityStatePageLoadMetricsPrerenderBrowserTest,
EnsurePrerenderingDoesNotRecordOnCommitSecurityLevelHistogram) { … }
class SecurityStatePageLoadMetricsFencedFrameBrowserTest
: public SecurityStatePageLoadMetricsMPArchBrowserTest { … };
IN_PROC_BROWSER_TEST_F(SecurityStatePageLoadMetricsFencedFrameBrowserTest,
DoNotRecordOnCommitSecurityLevelHistogram) { … }