#include "components/services/storage/dom_storage/session_storage_data_map.h"
#include <map>
#include <string_view>
#include <tuple>
#include <vector>
#include "base/containers/span.h"
#include "base/functional/bind.h"
#include "base/memory/ptr_util.h"
#include "base/run_loop.h"
#include "base/task/thread_pool.h"
#include "base/test/bind.h"
#include "base/test/task_environment.h"
#include "components/services/storage/dom_storage/async_dom_storage_database.h"
#include "components/services/storage/dom_storage/dom_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 "url/gurl.h"
namespace storage {
namespace {
std::vector<uint8_t> StdStringToUint8Vector(const std::string& s) { … }
MATCHER(OKStatus, "Equality matcher for type OK leveldb::Status") { … }
base::span<const uint8_t> MakeBytes(std::string_view str) { … }
mojo::PendingRemote<blink::mojom::StorageAreaObserver> MakeStubObserver() { … }
class MockListener : public SessionStorageDataMap::Listener { … };
void GetAllDataCallback(base::OnceClosure callback,
std::vector<blink::mojom::KeyValuePtr>* data_out,
std::vector<blink::mojom::KeyValuePtr> data) { … }
blink::mojom::StorageArea::GetAllCallback MakeGetAllCallback(
base::OnceClosure callback,
std::vector<blink::mojom::KeyValuePtr>* data_out) { … }
class SessionStorageDataMapTest : public testing::Test { … };
}
TEST_F(SessionStorageDataMapTest, BasicEmptyCreation) { … }
TEST_F(SessionStorageDataMapTest, ExplicitlyEmpty) { … }
TEST_F(SessionStorageDataMapTest, Clone) { … }
}