#include "chrome/browser/ai/ai_manager_keyed_service.h"
#include <memory>
#include "base/memory/raw_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/supports_user_data.h"
#include "base/test/mock_callback.h"
#include "chrome/browser/ai/ai_manager_keyed_service_factory.h"
#include "chrome/browser/ai/ai_text_session.h"
#include "chrome/browser/optimization_guide/mock_optimization_guide_keyed_service.h"
#include "chrome/browser/optimization_guide/optimization_guide_keyed_service_factory.h"
#include "chrome/test/base/chrome_render_view_host_test_harness.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/optimization_guide/core/mock_optimization_guide_model_executor.h"
#include "components/optimization_guide/core/optimization_guide_model_executor.h"
#include "components/optimization_guide/core/optimization_guide_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/mojom/ai/ai_manager.mojom-shared.h"
#include "third_party/blink/public/mojom/ai/ai_manager.mojom.h"
#include "third_party/blink/public/mojom/ai/ai_text_session.mojom.h"
#include "third_party/blink/public/mojom/ai/ai_text_session_info.mojom.h"
MockSession;
MockSessionWrapper;
_;
An;
AtMost;
Invoke;
NiceMock;
Return;
namespace {
class MockSupportsUserData : public base::SupportsUserData { … };
const optimization_guide::TokenLimits& GetFakeTokenLimits() { … }
}
class AIManagerKeyedServiceTest : public ChromeRenderViewHostTestHarness { … };
TEST_F(AIManagerKeyedServiceTest, NoUAFWithInvalidOnDeviceModelPath) { … }
TEST_F(AIManagerKeyedServiceTest, AIContextBoundObjectSet) { … }