#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[] = …;
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() { … }
}
class SystemInfoAPITest : public testing::Test { … };
TEST_F(SystemInfoAPITest, DisplayListener_AddRemove) { … }
TEST_F(SystemInfoAPITest, DisplayListener_MultipleContexts) { … }
TEST_F(SystemInfoAPITest, DisplayListener_MultipleListeners) { … }
TEST_F(SystemInfoAPITest, StorageListener_AddRemove) { … }
TEST_F(SystemInfoAPITest, StorageListener_MultipleContexts) { … }
TEST_F(SystemInfoAPITest, StorageListener_MultipleListeners) { … }
}