chromium/chrome/browser/policy/test/safe_browsing_policy_browsertest.cc

// Copyright 2019 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <string>
#include <vector>

#include "base/memory/ptr_util.h"
#include "base/strings/stringprintf.h"
#include "base/values.h"
#include "build/build_config.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/policy/safe_browsing_policy_test.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/safe_browsing/chrome_password_protection_service.h"
#include "chrome/test/base/chrome_test_utils.h"
#include "components/policy/core/common/policy_map.h"
#include "components/policy/policy_constants.h"
#include "components/prefs/pref_service.h"
#include "components/safe_browsing/core/common/features.h"
#include "components/safe_browsing/core/common/safe_browsing_prefs.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "url/gurl.h"

ReusedPasswordAccountType;
Return;

namespace policy {

int IsEnhancedProtectionMessageVisibleOnInterstitial(
    SafeBrowsingPolicyTest* browser_test) {}

// Test extended reporting is managed by policy.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest,
                       SafeBrowsingExtendedReportingPolicyManaged) {}

#if !BUILDFLAG(IS_ANDROID)
// Test that when Safe Browsing state is managed by policy, the enhanced
// protection message does not appear on SSL blocking pages.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest, SafeBrowsingStatePolicyManaged) {}

// Test that when safe browsing allowlist domains are set by policy, safe
// browsing service gets the correct value.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest, SafeBrowsingAllowlistDomains) {}

// Test that when password protection login URLs are set by policy, password
// protection service gets the correct value.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest, PasswordProtectionLoginURLs) {}

// Test that when password protection change password URL is set by policy,
// password protection service gets the correct value.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest,
                       PasswordProtectionChangePasswordURL) {}

class MockPasswordProtectionService
    : public safe_browsing::ChromePasswordProtectionService {};

// Test that when password protection warning trigger is set for users who are
// not signed-into Chrome, Chrome password protection service gets the correct
// value.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest,
                       PasswordProtectionWarningTriggerNotLoggedIn) {}

// Test that when password protection warning trigger is set for Gmail users,
// Chrome password protection service gets the correct
// value.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest,
                       PasswordProtectionWarningTriggerGmail) {}

// Test that when password protection warning trigger is set for GSuite users,
// Chrome password protection service gets the correct value.
IN_PROC_BROWSER_TEST_F(SafeBrowsingPolicyTest,
                       PasswordProtectionWarningTriggerGSuite) {}
#endif  // !BUILDFLAG(IS_ANDROID)

}  // namespace policy