chromium/chrome/browser/extensions/api/settings_private/settings_private_event_router_unittest.cc

// Copyright 2023 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/extensions/api/settings_private/settings_private_event_router.h"

#include "base/test/run_until.h"
#include "chrome/browser/extensions/api/settings_private/settings_private_event_router_factory.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/common/pref_names.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 "content/public/test/browser_task_environment.h"
#include "content/public/test/mock_render_process_host.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/process_map.h"
#include "extensions/browser/process_map_factory.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace extensions {
namespace {

// A fake that pretends that all contexts are WebUI.
class ProcessMapFake : public ProcessMap {};

std::unique_ptr<KeyedService> BuildEventRouter(
    content::BrowserContext* profile) {}

std::unique_ptr<KeyedService> BuildSettingsPrivateEventRouter(
    content::BrowserContext* profile) {}

std::unique_ptr<KeyedService> BuildProcessMap(
    content::BrowserContext* profile) {}

// Tracks event dispatches to a specific process.
class EventRouterObserver : public EventRouter::TestObserver {};

class SettingsPrivateEventRouterTest : public testing::Test {};

// Tests that events from incognito profiles do not get routed to regular
// profiles. Regression test for https://crbug.com/1381219.
TEST_F(SettingsPrivateEventRouterTest, IncognitoEventRouting) {}

}  // namespace
}  // namespace extensions