chromium/chrome/browser/enterprise/connectors/reporting/extension_install_event_router_unittest.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "chrome/browser/enterprise/connectors/reporting/extension_install_event_router.h"

#include <memory>
#include <set>
#include <string>
#include <utility>

#include "base/memory/raw_ptr.h"
#include "chrome/browser/enterprise/connectors/common.h"
#include "chrome/browser/enterprise/connectors/reporting/realtime_reporting_client.h"
#include "chrome/browser/enterprise/connectors/reporting/realtime_reporting_client_factory.h"
#include "chrome/browser/enterprise/connectors/test/deep_scanning_test_utils.h"
#include "chrome/browser/policy/dm_token_utils.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/enterprise/connectors/core/reporting_service_settings.h"
#include "components/keyed_service/core/keyed_service.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
#include "content/public/test/browser_task_environment.h"
#include "extensions/common/constants.h"
#include "extensions/common/extension.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

_;
ByRef;
Eq;
Return;
namespace enterprise_connectors {

namespace {

constexpr char kFakeExtensionId[] =;
constexpr char kFakeExtensionName[] =;
constexpr char kFakeExtensionDescription[] =;
constexpr char kFakeProfileUsername[] =;
constexpr char kFakeInstallAction[] =;
constexpr char kFakeUpdateAction[] =;
constexpr char kFakeUninstallAction[] =;
constexpr char kFakeExtensionVersion[] =;
constexpr char kFakeExtensionSource[] =;

}  // namespace

// A SafeBrowsingDatabaseManager implementation that returns a fixed result for
// a given URL.
class MockRealtimeReportingClient : public RealtimeReportingClient {};

std::unique_ptr<KeyedService> CreateMockRealtimeReportingClient(
    content::BrowserContext* profile_) {}

class ExtensionInstallEventRouterTest : public testing::Test {};

TEST_F(ExtensionInstallEventRouterTest, CheckInstallEventReported) {}

TEST_F(ExtensionInstallEventRouterTest, CheckUpdateEventReported) {}

TEST_F(ExtensionInstallEventRouterTest, CheckUninstallEventReported) {}

}  // namespace enterprise_connectors