#include "base/memory/shared_memory_hooks.h"
#include <optional>
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
class SharedMemoryHooksTest : public ::testing::Test { … };
std::optional<size_t> requested_read_only_shmem_size;
std::optional<size_t> requested_unsafe_shmem_size;
std::optional<size_t> requested_writable_shmem_size;
MappedReadOnlyRegion ReadOnlyShmemCreateHook(size_t size, SharedMemoryMapper* mapper) { … }
UnsafeSharedMemoryRegion UnsafeShmemCreateHook(size_t size) { … }
WritableSharedMemoryRegion WritableShmemCreateHook(size_t size) { … }
TEST_F(SharedMemoryHooksTest, Basic) { … }
}