summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/tests/gl_tests_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/tests/gl_tests_main.cc')
-rw-r--r--gpu/command_buffer/tests/gl_tests_main.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/gpu/command_buffer/tests/gl_tests_main.cc b/gpu/command_buffer/tests/gl_tests_main.cc
index 7b7d8d86..6ac5719 100644
--- a/gpu/command_buffer/tests/gl_tests_main.cc
+++ b/gpu/command_buffer/tests/gl_tests_main.cc
@@ -24,7 +24,14 @@
namespace {
int RunHelper(base::TestSuite* testSuite) {
+#if defined(USE_OZONE)
+ base::MessageLoopForUI main_loop;
+#else
base::MessageLoopForIO message_loop;
+#endif
+ gfx::GLSurface::InitializeOneOff();
+ ::gles2::Initialize();
+ gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess());
return testSuite->Run();
}
@@ -39,9 +46,6 @@ int main(int argc, char** argv) {
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool pool;
#endif
- gfx::GLSurface::InitializeOneOff();
- ::gles2::Initialize();
- gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess());
testing::InitGoogleMock(&argc, argv);
return base::LaunchUnitTestsSerially(
argc,