OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // This file defines tests that implementations of GpuMemoryBufferFactory should | 5 // This file defines tests that implementations of GpuMemoryBufferFactory should |
6 // pass in order to be conformant. | 6 // pass in order to be conformant. |
7 | 7 |
8 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ | 8 #ifndef GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ |
9 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ | 9 #define GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ |
10 | 10 |
11 #include <stddef.h> | 11 #include <stddef.h> |
12 #include <string.h> | 12 #include <string.h> |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
| 16 #include "base/bind.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "ui/gfx/buffer_format_util.h" | 18 #include "ui/gfx/buffer_format_util.h" |
18 | 19 |
19 namespace gpu { | 20 namespace gpu { |
20 | 21 |
21 template <typename GpuMemoryBufferImplType> | 22 template <typename GpuMemoryBufferImplType> |
22 class GpuMemoryBufferImplTest : public testing::Test { | 23 class GpuMemoryBufferImplTest : public testing::Test { |
23 public: | 24 public: |
24 GpuMemoryBufferImpl::DestructionCallback AllocateGpuMemoryBuffer( | 25 GpuMemoryBufferImpl::DestructionCallback AllocateGpuMemoryBuffer( |
25 const gfx::Size& size, | 26 const gfx::Size& size, |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 // The GpuMemoryBufferImplTest test case verifies behavior that is expected | 201 // The GpuMemoryBufferImplTest test case verifies behavior that is expected |
201 // from a GpuMemoryBuffer implementation in order to be conformant. | 202 // from a GpuMemoryBuffer implementation in order to be conformant. |
202 REGISTER_TYPED_TEST_CASE_P(GpuMemoryBufferImplTest, | 203 REGISTER_TYPED_TEST_CASE_P(GpuMemoryBufferImplTest, |
203 CreateFromHandle, | 204 CreateFromHandle, |
204 Map, | 205 Map, |
205 PersistentMap); | 206 PersistentMap); |
206 | 207 |
207 } // namespace gpu | 208 } // namespace gpu |
208 | 209 |
209 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ | 210 #endif // GPU_IPC_CLIENT_GPU_MEMORY_BUFFER_IMPL_TEST_TEMPLATE_H_ |
OLD | NEW |