#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "gpu/command_buffer/client/mapped_memory.h"
#include <stddef.h>
#include <stdint.h>
#include <list>
#include <memory>
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "gpu/command_buffer/client/cmd_buffer_helper.h"
#include "gpu/command_buffer/client/command_buffer_direct_locked.h"
#include "gpu/command_buffer/service/mocks.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace gpu {
Return;
Mock;
Truly;
Sequence;
DoAll;
Invoke;
_;
class MappedMemoryTestBase : public testing::Test { … };
const unsigned int MappedMemoryTestBase::kBufferSize;
class MemoryChunkTest : public MappedMemoryTestBase { … };
const int32_t MemoryChunkTest::kShmId;
TEST_F(MemoryChunkTest, Basic) { … }
class MappedMemoryManagerTest : public MappedMemoryTestBase { … };
TEST_F(MappedMemoryManagerTest, Basic) { … }
TEST_F(MappedMemoryManagerTest, FreePendingToken) { … }
TEST_F(MappedMemoryManagerTest, FreeUnused) { … }
TEST_F(MappedMemoryManagerTest, ChunkSizeMultiple) { … }
TEST_F(MappedMemoryManagerTest, UnusedMemoryLimit) { … }
TEST_F(MappedMemoryManagerTest, MemoryLimitWithReuse) { … }
TEST_F(MappedMemoryManagerTest, MaxAllocationTest) { … }
}