#include "components/services/storage/dom_storage/session_storage_metadata.h"
#include <string>
#include "base/containers/contains.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/utf_string_conversions.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/async_dom_storage_database.h"
#include "components/services/storage/dom_storage/dom_storage_database.h"
#include "components/services/storage/dom_storage/testing_legacy_session_storage_database.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/leveldatabase/env_chromium.h"
#include "third_party/leveldatabase/leveldb_chrome.h"
#include "third_party/leveldatabase/src/include/leveldb/db.h"
#include "third_party/leveldatabase/src/include/leveldb/options.h"
namespace storage {
namespace {
std::vector<uint8_t> StdStringToUint8Vector(const std::string& s) { … }
std::vector<uint8_t> SliceToVector(const leveldb::Slice& s) { … }
void ErrorCallback(leveldb::Status* status_out, leveldb::Status status) { … }
class SessionStorageMetadataTest : public testing::Test { … };
TEST_F(SessionStorageMetadataTest, SaveNewMetadata) { … }
TEST_F(SessionStorageMetadataTest, LoadingData) { … }
TEST_F(SessionStorageMetadataTest, SaveNewMap) { … }
TEST_F(SessionStorageMetadataTest, ShallowCopies) { … }
TEST_F(SessionStorageMetadataTest, DeleteNamespace) { … }
TEST_F(SessionStorageMetadataTest, DeleteArea) { … }
TEST_F(SessionStorageMetadataTest, DatabaseVersionTooNew) { … }
class SessionStorageMetadataMigrationTest : public testing::Test { … };
struct BatchCollector : public leveldb::WriteBatch::Handler { … };
TEST_F(SessionStorageMetadataMigrationTest, MigrateV0ToV1) { … }
}
}