#include <memory>
#include <set>
#include <utility>
#include "base/containers/contains.h"
#include "base/files/file_path.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/location.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/scoped_observation.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/simple_test_tick_clock.h"
#include "chrome/browser/extensions/api/runtime/chrome_runtime_api_delegate.h"
#include "chrome/browser/extensions/chrome_test_extension_loader.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_with_install.h"
#include "chrome/browser/extensions/test_extension_system.h"
#include "chrome/browser/extensions/update_install_gate.h"
#include "chrome/browser/extensions/updater/extension_updater.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/extension_prefs.h"
#include "extensions/browser/extension_registry.h"
#include "extensions/browser/updater/extension_downloader.h"
#include "extensions/browser/updater/extension_downloader_test_delegate.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_id.h"
#include "extensions/common/verifier_formats.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace extensions {
namespace {
class TestEventRouter : public EventRouter { … };
std::unique_ptr<KeyedService> TestEventRouterFactoryFunction(
content::BrowserContext* context) { … }
class DownloaderTestDelegate : public ExtensionDownloaderTestDelegate { … };
class UpdateCheckResultCatcher { … };
class ChromeRuntimeAPIDelegateTest : public ExtensionServiceTestWithInstall { … };
TEST_F(ChromeRuntimeAPIDelegateTest, RequestUpdateCheck) { … }
class ExtensionLoadWaiter : public ExtensionRegistryObserver { … };
class ChromeRuntimeAPIDelegateReloadTest : public ChromeRuntimeAPIDelegateTest { … };
#if BUILDFLAG(IS_LINUX)
#define MAYBE_TerminateExtensionWithTooManyReloads …
#else
#define MAYBE_TerminateExtensionWithTooManyReloads …
#endif
TEST_F(ChromeRuntimeAPIDelegateReloadTest,
MAYBE_TerminateExtensionWithTooManyReloads) { … }
TEST_F(ChromeRuntimeAPIDelegateReloadTest,
ReloadExtensionAfterThresholdInterval) { … }
}
}