#ifndef COMPONENTS_SERVICES_STORAGE_DOM_STORAGE_STORAGE_AREA_TEST_UTIL_H_
#define COMPONENTS_SERVICES_STORAGE_DOM_STORAGE_STORAGE_AREA_TEST_UTIL_H_
#include <stdint.h>
#include <optional>
#include <vector>
#include "base/functional/callback.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
#include "mojo/public/cpp/bindings/receiver.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "third_party/blink/public/mojom/dom_storage/storage_area.mojom.h"
namespace storage {
namespace test {
base::OnceCallback<void(bool)> MakeSuccessCallback(base::OnceClosure callback,
bool* success_out);
bool PutSync(blink::mojom::StorageArea* area,
const std::vector<uint8_t>& key,
const std::vector<uint8_t>& value,
const std::optional<std::vector<uint8_t>>& old_value,
const std::string& source);
bool GetSync(blink::mojom::StorageArea* area,
const std::vector<uint8_t>& key,
std::vector<uint8_t>* data_out);
bool GetAllSync(blink::mojom::StorageArea* area,
std::vector<blink::mojom::KeyValuePtr>* data_out);
bool DeleteSync(blink::mojom::StorageArea* area,
const std::vector<uint8_t>& key,
const std::optional<std::vector<uint8_t>>& client_old_value,
const std::string& source);
bool DeleteAllSync(blink::mojom::StorageArea* area, const std::string& source);
blink::mojom::StorageArea::GetAllCallback MakeGetAllCallback(
base::OnceClosure callback,
std::vector<blink::mojom::KeyValuePtr>* data_out);
class MockLevelDBObserver : public blink::mojom::StorageAreaObserver { … };
}
}
#endif