#include "base/test/scoped_feature_list.h"
#include "chrome/browser/enterprise/connectors/interstitials/enterprise_block_page.h"
#include "chrome/browser/enterprise/connectors/interstitials/enterprise_warn_page.h"
#include "base/test/metrics/histogram_tester.h"
#include "chrome/browser/enterprise/connectors/interstitials/enterprise_block_controller_client.h"
#include "chrome/browser/enterprise/connectors/interstitials/enterprise_warn_controller_client.h"
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/security_interstitials/core/metrics_helper.h"
#include "components/security_interstitials/core/unsafe_resource.h"
#include "content/public/browser/web_contents.h"
#include "content/public/test/test_renderer_host.h"
namespace {
constexpr char kBlockDecisionHistogram[] = …;
constexpr char kWarnDecisionHistogram[] = …;
constexpr char kTestUrl[] = …;
constexpr char kTestMessage[] = …;
void AddCustomMessageToResource(
security_interstitials::UnsafeResource& unsafe_resource) { … }
class EnterprisePageTest : public testing::Test { … };
TEST_F(EnterprisePageTest, EnterpriseBlock_ShownAndMetricsRecorded) { … }
TEST_F(EnterprisePageTest, EnterpriseWarn_ShownAndMetricsRecorded) { … }
TEST_F(EnterprisePageTest, EnterpriseWarn_CustomMessageDisplayed) { … }
TEST_F(EnterprisePageTest, EnterpriseBlock_CustomMessageDisplayed) { … }
}