| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "gpu/command_buffer/service/gpu_service_test.h" | 5 #include "gpu/command_buffer/service/gpu_service_test.h" |
| 6 | 6 |
| 7 #include "gpu/command_buffer/service/test_helper.h" | 7 #include "gpu/command_buffer/service/test_helper.h" |
| 8 #include "gpu/test_message_loop_type.h" | |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "ui/gl/gl_context_stub.h" | 9 #include "ui/gl/gl_context_stub.h" |
| 11 #include "ui/gl/gl_implementation.h" | 10 #include "ui/gl/gl_implementation.h" |
| 12 #include "ui/gl/gl_mock.h" | 11 #include "ui/gl/gl_mock.h" |
| 13 #include "ui/gl/gl_surface_stub.h" | 12 #include "ui/gl/gl_surface_stub.h" |
| 14 #include "ui/gl/init/gl_factory.h" | 13 #include "ui/gl/init/gl_factory.h" |
| 15 #include "ui/gl/test/gl_surface_test_support.h" | 14 #include "ui/gl/test/gl_surface_test_support.h" |
| 16 | 15 |
| 17 namespace gpu { | 16 namespace gpu { |
| 18 namespace gles2 { | 17 namespace gles2 { |
| 19 | 18 |
| 20 GpuServiceTest::GpuServiceTest() | 19 GpuServiceTest::GpuServiceTest() : ran_setup_(false), ran_teardown_(false) {} |
| 21 : ran_setup_(false), | |
| 22 ran_teardown_(false), | |
| 23 message_loop_(test::GetMessageLoopTypeForGpu()) {} | |
| 24 | 20 |
| 25 GpuServiceTest::~GpuServiceTest() { | 21 GpuServiceTest::~GpuServiceTest() { |
| 26 DCHECK(ran_teardown_); | 22 DCHECK(ran_teardown_); |
| 27 } | 23 } |
| 28 | 24 |
| 29 void GpuServiceTest::SetUpWithGLVersion(const char* gl_version, | 25 void GpuServiceTest::SetUpWithGLVersion(const char* gl_version, |
| 30 const char* gl_extensions) { | 26 const char* gl_extensions) { |
| 31 testing::Test::SetUp(); | 27 testing::Test::SetUp(); |
| 32 | 28 |
| 33 gl::SetGLGetProcAddressProc(gl::MockGLInterface::GetGLProcAddress); | 29 gl::SetGLGetProcAddressProc(gl::MockGLInterface::GetGLProcAddress); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 62 gl::GLContext* GpuServiceTest::GetGLContext() { | 58 gl::GLContext* GpuServiceTest::GetGLContext() { |
| 63 return context_.get(); | 59 return context_.get(); |
| 64 } | 60 } |
| 65 | 61 |
| 66 gl::GLSurface* GpuServiceTest::GetGLSurface() { | 62 gl::GLSurface* GpuServiceTest::GetGLSurface() { |
| 67 return surface_.get(); | 63 return surface_.get(); |
| 68 } | 64 } |
| 69 | 65 |
| 70 } // namespace gles2 | 66 } // namespace gles2 |
| 71 } // namespace gpu | 67 } // namespace gpu |
| OLD | NEW |