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

// Copyright 2024 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_telemetry_event_router.h"

#include "base/memory/raw_ptr.h"
#include "base/strings/stringprintf.h"
#include "base/test/values_test_util.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_constants.h"
#include "components/enterprise/connectors/core/reporting_service_settings.h"
#include "components/policy/core/common/cloud/mock_cloud_policy_client.h"
#include "components/safe_browsing/core/common/features.h"
#include "content/public/test/browser_task_environment.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace enterprise_connectors {

namespace {

RepeatedPtrField;
_;
ByRef;
Eq;
Return;

ExtensionInfo;
RemoteHostInfo;
CookiesGetAllInfo;
CookiesGetInfo;
RemoteHostContactedInfo;
TabsApiInfo;

constexpr const char kFakeProfileUsername[] =;
constexpr const char kFakeExtensionId[] =;
constexpr const char kFakeExtensionVersion[] =;
constexpr const char kFakeExtensionName[] =;

constexpr const char kCookieDomain[] =;
constexpr const char kCookieName[] =;
constexpr const char kCookiePath[] =;
constexpr const char kCookieStoreId[] =;
constexpr const char kCookieURL[] =;
constexpr const char kRemoteHostContactedURL[] =;
constexpr const char kTabsNewURL[] =;
constexpr const char kTabsCurrentURL[] =;

}  // namespace

class MockRealtimeReportingClient : public RealtimeReportingClient {};

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

class ExtensionTelemetryEventRouterTest : public testing::Test {};

class ExtensionTelemetryEventInstallLocationTest
    : public ExtensionTelemetryEventRouterTest,
      public testing::WithParamInterface<ExtensionInfo::InstallLocation> {};

TEST_P(ExtensionTelemetryEventInstallLocationTest,
       CheckTelemetryEventReported) {}

INSTANTIATE_TEST_SUITE_P();

TEST_F(ExtensionTelemetryEventRouterTest, CheckIsPolicyEnabled) {}

}  // namespace enterprise_connectors