#include "components/services/storage/dom_storage/session_storage_impl.h"
#include <stdint.h>
#include <memory>
#include <string_view>
#include <vector>
#include "base/containers/contains.h"
#include "base/files/file_enumerator.h"
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/functional/callback_helpers.h"
#include "base/memory/ref_counted.h"
#include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "base/uuid.h"
#include "components/services/storage/dom_storage/storage_area_test_util.h"
#include "components/services/storage/dom_storage/testing_legacy_session_storage_database.h"
#include "mojo/public/cpp/bindings/remote.h"
#include "mojo/public/cpp/system/functions.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
namespace storage {
namespace {
std::vector<uint8_t> StdStringToUint8Vector(const std::string& s) { … }
std::vector<uint8_t> StringViewToUint8Vector(std::string_view s) { … }
std::vector<uint8_t> String16ToUint8Vector(const std::u16string& s) { … }
static const char kSessionStorageDirectory[] = …;
class SessionStorageImplTest : public testing::Test { … };
TEST_F(SessionStorageImplTest, MigrationV0ToV1) { … }
TEST_F(SessionStorageImplTest, StartupShutdownSave) { … }
TEST_F(SessionStorageImplTest, CloneBeforeBrowserClone) { … }
TEST_F(SessionStorageImplTest, Cloning) { … }
TEST_F(SessionStorageImplTest, ImmediateCloning) { … }
TEST_F(SessionStorageImplTest, Scavenging) { … }
TEST_F(SessionStorageImplTest, InvalidVersionOnDisk) { … }
TEST_F(SessionStorageImplTest, CorruptionOnDisk) { … }
TEST_F(SessionStorageImplTest, RecreateOnCommitFailure) { … }
TEST_F(SessionStorageImplTest, DontRecreateOnRepeatedCommitFailure) { … }
TEST_F(SessionStorageImplTest, GetUsage) { … }
TEST_F(SessionStorageImplTest, DeleteStorage) { … }
TEST_F(SessionStorageImplTest, PurgeInactiveWrappers) { … }
TEST_F(SessionStorageImplTest, ClearDiskState) { … }
TEST_F(SessionStorageImplTest, InterruptedCloneWithDelete) { … }
TEST_F(SessionStorageImplTest, InterruptedCloneChainWithDelete) { … }
TEST_F(SessionStorageImplTest, InterruptedTripleCloneChain) { … }
TEST_F(SessionStorageImplTest, TotalCloneChainDeletion) { … }
}
TEST_F(SessionStorageImplTest, PurgeMemoryDoesNotCrashOrHang) { … }
TEST_F(SessionStorageImplTest, DeleteWithPersistBeforeBrowserClone) { … }
TEST_F(SessionStorageImplTest, DeleteWithoutPersistBeforeBrowserClone) { … }
TEST_F(SessionStorageImplTest, DeleteAfterCloneWithoutMojoClone) { … }
TEST_F(SessionStorageImplTest, Bug1128318) { … }
}