Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: gpu/ipc/service/gpu_channel_unittest.cc

Issue 1950093002: Fix gpu_ipc_service_unittests on android release gn builds (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_channel_unittest.cc
diff --git a/gpu/ipc/service/gpu_channel_unittest.cc b/gpu/ipc/service/gpu_channel_unittest.cc
index 9d5809ab51bbe8b496ee0d60a86907719ef6a5d3..3289cf47cf7a06dd11007c20ee6bd5ff7e67401d 100644
--- a/gpu/ipc/service/gpu_channel_unittest.cc
+++ b/gpu/ipc/service/gpu_channel_unittest.cc
@@ -22,6 +22,12 @@ class GpuChannelTest : public GpuChannelTestCommon {
GpuChannelTest() : GpuChannelTestCommon() {}
~GpuChannelTest() override {}
+ void SetUp() override {
+ // We need GL bindings to actually initialize command buffers.
+ gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
+ gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
+ }
+
GpuChannel* CreateChannel(int32_t client_id,
bool allow_view_command_buffers,
bool allow_real_time_streams) {
@@ -70,10 +76,6 @@ const SurfaceHandle kFakeSurfaceHandle = 1;
#endif
TEST_F(GpuChannelTest, CreateViewCommandBufferAllowed) {
- // We need GL bindings to actually initialize command buffers.
- gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
- gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
-
int32_t kClientId = 1;
bool allow_view_command_buffers = true;
GpuChannel* channel =
@@ -301,10 +303,6 @@ TEST_F(GpuChannelTest, RealTimeStreamsAllowed) {
}
TEST_F(GpuChannelTest, CreateFailsIfSharedContextIsLost) {
- // We need GL bindings to actually initialize command buffers.
- gfx::SetGLGetProcAddressProc(gfx::MockGLInterface::GetGLProcAddress);
- gfx::GLSurfaceTestSupport::InitializeOneOffWithMockBindings();
-
// This GLInterface is a stub for the gl driver.
std::unique_ptr<gfx::MockGLInterface> gl_interface(
new testing::NiceMock<gfx::MockGLInterface>);
« no previous file with comments | « gpu/ipc/service/BUILD.gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698