#include "base/test/values_test_util.h"
#include "chrome/browser/extensions/extension_service.h"
#include "chrome/browser/extensions/extension_service_test_with_install.h"
#include "chrome/browser/profiles/profile.h"
#include "components/value_store/value_store_factory_impl.h"
#include "extensions/browser/api/storage/storage_api.h"
#include "extensions/browser/api/storage/storage_frontend.h"
#include "extensions/browser/api_test_utils.h"
#include "extensions/browser/event_router.h"
#include "extensions/browser/event_router_factory.h"
#include "extensions/browser/test_extension_registry_observer.h"
#include "extensions/common/mojom/context_type.mojom.h"
#include "extensions/test/test_extension_dir.h"
namespace extensions {
namespace {
std::unique_ptr<KeyedService> CreateStorageFrontendForTesting(
content::BrowserContext* context) { … }
std::unique_ptr<KeyedService> BuildEventRouter(
content::BrowserContext* profile) { … }
}
class SessionStorageApiUnittest : public ExtensionServiceTestWithInstall { … };
void SessionStorageApiUnittest::RunFunction(
scoped_refptr<ExtensionFunction> function,
const std::string& args,
scoped_refptr<const Extension> extension) { … }
std::optional<base::Value> SessionStorageApiUnittest::GetStorage(
scoped_refptr<const Extension> extension) { … }
void SessionStorageApiUnittest::SetUp() { … }
void SessionStorageApiUnittest::TearDown() { … }
void SessionStorageApiUnittest::SetFunctionProperties(
scoped_refptr<ExtensionFunction> function,
scoped_refptr<const Extension> extension) { … }
TEST_F(SessionStorageApiUnittest,
SessionStorageClearedWhenExtensionIsReloaded) { … }
}