chromium/extensions/browser/api/system_info/system_info_api_unittest.cc

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "extensions/browser/api/system_info/system_info_api.h"

#include <string>

#include "base/containers/flat_map.h"
#include "base/memory/raw_ptr.h"
#include "base/no_destructor.h"
#include "components/storage_monitor/storage_info.h"
#include "components/storage_monitor/storage_monitor.h"
#include "components/storage_monitor/test_storage_monitor.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/mock_render_process_host.h"
#include "content/public/test/test_browser_context.h"
#include "extensions/browser/api/system_display/display_info_provider.h"
#include "extensions/browser/api/system_info/system_info_provider.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/test_extensions_browser_client.h"
#include "extensions/common/api/system_display.h"
#include "extensions/common/api/system_storage.h"
#include "extensions/common/extension_id.h"
#include "testing/gtest/include/gtest/gtest.h"

namespace extensions {

namespace {

const char kFakeExtensionId[] =;
const char kFakeExtensionId2[] =;

// Extends TestExtensionsBrowserClient to support a secondary context, and also
// tracks events broadcast to renderers.
class FakeExtensionsBrowserClient : public TestExtensionsBrowserClient {};

class FakeDisplayInfoProvider : public DisplayInfoProvider {};

EventRouter* CreateAndUsePreflessEventRouter(content::BrowserContext* context) {}

const std::string& GetFakeStorageDeviceId() {}

const storage_monitor::StorageInfo& GetFakeStorageInfo() {}

base::Value::List GetStorageAttachedArgs() {}

base::Value::List GetStorageDetachedArgs() {}

}  // namespace

class SystemInfoAPITest : public testing::Test {};

/******************************************************************************/
// Display event tests
/******************************************************************************/

TEST_F(SystemInfoAPITest, DisplayListener_AddRemove) {}

TEST_F(SystemInfoAPITest, DisplayListener_MultipleContexts) {}

TEST_F(SystemInfoAPITest, DisplayListener_MultipleListeners) {}

/******************************************************************************/
// Storage event tests
/******************************************************************************/

TEST_F(SystemInfoAPITest, StorageListener_AddRemove) {}

TEST_F(SystemInfoAPITest, StorageListener_MultipleContexts) {}

TEST_F(SystemInfoAPITest, StorageListener_MultipleListeners) {}

}  // namespace extensions