#include <memory>
#include "base/containers/contains.h"
#include "base/memory/raw_ptr.h"
#include "base/values.h"
#include "extensions/browser/api/storage/session_storage_manager.h"
#include "extensions/browser/extensions_test.h"
#include "testing/gmock/include/gmock/gmock-matchers.h"
namespace {
constexpr int kQuotaBytesPerExtension = …;
constexpr char kTestExtensionId1[] = …;
constexpr char kTestExtensionId2[] = …;
constexpr char kQuotaBytesExceededError[] = …;
ValueChangeList;
AllOf;
Ge;
Le;
std::unique_ptr<KeyedService> SetTestingSessionStorageManager(
content::BrowserContext* browser_context) { … }
}
namespace extensions {
class SessionStorageManagerUnittest : public ExtensionsTest { … };
void SessionStorageManagerUnittest::SetUp() { … }
void SessionStorageManagerUnittest::TearDown() { … }
TEST_F(SessionStorageManagerUnittest, SetGetAndRemoveOneExtensionSuccessful) { … }
TEST_F(SessionStorageManagerUnittest, ClearOneExtensionSuccessful) { … }
TEST_F(SessionStorageManagerUnittest,
SetGetAndRemovetMultipleExtensionsSuccessful) { … }
TEST_F(SessionStorageManagerUnittest, ChangeValueOfExistentKeys) { … }
TEST_F(SessionStorageManagerUnittest, SetFailsWhenQuotaIsExceeded) { … }
TEST_F(SessionStorageManagerUnittest, GetEmptyWhenInvalidKey) { … }
TEST_F(SessionStorageManagerUnittest, GetBytesInUse) { … }
}