#include "chrome/browser/devtools/aida_client.h"
#include <memory>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/test/metrics/histogram_tester.h"
#include "build/branding_buildflags.h"
#include "chrome/browser/browser_features.h"
#include "chrome/browser/signin/identity_test_environment_profile_adaptor.h"
#include "chrome/common/pref_names.h"
#include "chrome/test/base/testing_profile.h"
#include "components/signin/public/identity_manager/account_capabilities_test_mutator.h"
#include "content/public/browser/network_service_instance.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_utils.h"
#include "services/network/network_service.h"
#include "services/network/public/mojom/network_context_client.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"
const char kEmail[] = …;
const char kEndpointUrlWithPath[] = …;
const char kEndpointUrl[] = …;
const char kScope[] = …;
class AidaClientTest : public testing::Test { … };
class Delegate { … };
constexpr char kOAuthToken[] = …;
TEST_F(AidaClientTest, FailsIfNotAuthorized) { … }
TEST_F(AidaClientTest, NotAvailableWithEnterprise) { … }
TEST_F(AidaClientTest, NoLoggingWithEnterprise) { … }
TEST_F(AidaClientTest, NotAvailableIfCapabilityFalse) { … }
TEST_F(AidaClientTest, NotAvailableInCountry) { … }
TEST_F(AidaClientTest, NoLoggingInEurope) { … }
TEST_F(AidaClientTest, LoggingInNonEurope) { … }
TEST_F(AidaClientTest, Succeeds) { … }
TEST_F(AidaClientTest, ReusesOAuthToken) { … }
TEST_F(AidaClientTest, RefetchesTokenWhenExpired) { … }