Index: gpu/command_buffer/tests/gl_tests_main.cc |
diff --git a/gpu/command_buffer/tests/gl_tests_main.cc b/gpu/command_buffer/tests/gl_tests_main.cc |
index 7b7d8d86ec25bae20b598c517991b0fa637bca28..22c6eb38f873e6de2356112ec2e9b4f23516cc2f 100644 |
--- a/gpu/command_buffer/tests/gl_tests_main.cc |
+++ b/gpu/command_buffer/tests/gl_tests_main.cc |
@@ -15,6 +15,9 @@ |
#include "gpu/config/gpu_util.h" |
#include "testing/gmock/include/gmock/gmock.h" |
#include "ui/gl/gl_surface.h" |
+#if defined(USE_OZONE) |
+#include "ui/ozone/public/ozone_platform.h" |
+#endif |
#if defined(OS_ANDROID) |
#include "base/android/jni_android.h" |
@@ -24,7 +27,9 @@ |
namespace { |
int RunHelper(base::TestSuite* testSuite) { |
+#if !defined(USE_OZONE) |
base::MessageLoopForIO message_loop; |
piman
2015/03/24 00:36:30
Can this move to main, so that the message loop cr
vignatti (out of this project)
2015/03/24 14:01:49
Done. Much better in fact!
|
+#endif |
return testSuite->Run(); |
} |
@@ -36,6 +41,11 @@ int main(int argc, char** argv) { |
#endif |
base::TestSuite test_suite(argc, argv); |
base::CommandLine::Init(argc, argv); |
+#if defined(USE_OZONE) |
+ base::MessageLoopForUI main_loop; |
+ ui::OzonePlatform::InitializeForUI(); |
+ ui::OzonePlatform::InitializeForGPU(); |
+#endif |
#if defined(OS_MACOSX) |
base::mac::ScopedNSAutoreleasePool pool; |
#endif |