#include "chrome/browser/ip_protection/ip_protection_config_provider.h"
#include <string>
#include <vector>
#include "base/callback_list.h"
#include "base/test/bind.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/test_future.h"
#include "base/time/time.h"
#include "base/values.h"
#include "chrome/browser/ip_protection/ip_protection_config_provider_factory.h"
#include "chrome/browser/policy/policy_test_utils.h"
#include "chrome/browser/profiles/profile_test_util.h"
#include "chrome/browser/signin/identity_manager_factory.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
#include "chrome/test/base/chrome_test_utils.h"
#include "chrome/test/base/platform_browser_test.h"
#include "components/ip_protection/common/ip_protection_data_types.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/privacy_sandbox/privacy_sandbox_features.h"
#include "components/signin/public/base/consent_level.h"
#include "components/signin/public/identity_manager/identity_test_utils.h"
#include "content/public/browser/network_service_util.h"
#include "content/public/browser/storage_partition.h"
#include "content/public/test/browser_test.h"
#include "mojo/public/cpp/bindings/receiver_set.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "net/base/features.h"
#include "services/network/public/cpp/features.h"
#include "services/network/public/mojom/network_context.mojom-test-utils.h"
#include "services/network/public/mojom/network_context.mojom.h"
#if BUILDFLAG(IS_CHROMEOS_ASH) || BUILDFLAG(IS_CHROMEOS_LACROS)
#include "components/signin/public/identity_manager/primary_account_change_event.h"
#endif
BlindSignedAuthToken;
GeoHint;
namespace {
class ScopedIpProtectionFeatureList { … };
class IpProtectionConfigGetterInterceptor
: public network::mojom::IpProtectionConfigGetterInterceptorForTesting { … };
constexpr base::Time kDontRetry = …;
}
class IpProtectionConfigProviderBrowserTest : public PlatformBrowserTest { … };
IN_PROC_BROWSER_TEST_F(IpProtectionConfigProviderBrowserTest,
NetworkServiceCanRequestTokens) { … }
IN_PROC_BROWSER_TEST_F(IpProtectionConfigProviderBrowserTest,
ExpectedReceiverSetStateAfterNetworkServiceCrash) { … }
#if !BUILDFLAG(IS_ANDROID)
class IpProtectionConfigProviderIdentityBrowserTest
: public IpProtectionConfigProviderBrowserTest { … };
IN_PROC_BROWSER_TEST_F(IpProtectionConfigProviderIdentityBrowserTest,
BackoffTimeResetAfterProfileAvailabilityChange) { … }
#endif
class IpProtectionConfigProviderUserSettingBrowserTest
: public IpProtectionConfigProviderBrowserTest { … };
IN_PROC_BROWSER_TEST_F(IpProtectionConfigProviderUserSettingBrowserTest,
OnIpProtectionEnabledChanged) { … }
class IpProtectionConfigProviderPolicyBrowserTest : public policy::PolicyTest { … };
IN_PROC_BROWSER_TEST_F(IpProtectionConfigProviderPolicyBrowserTest,
IpProtectionEnterprisePolicyDisableAndEnable) { … }
IN_PROC_BROWSER_TEST_F(IpProtectionConfigProviderPolicyBrowserTest,
IpProtectionEnterprisePolicyUnsetAfterSet) { … }