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

Unified Diff: gpu/command_buffer/common/unittest_main.cc

Issue 1025523005: gl_tests: Use zero size gl surface for offscreen rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove unneeded ozone symbols and add gl init inside callback Created 5 years, 9 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/command_buffer/client/ring_buffer_test.cc ('k') | gpu/command_buffer/service/gpu_scheduler_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/common/unittest_main.cc
diff --git a/gpu/command_buffer/common/unittest_main.cc b/gpu/command_buffer/common/unittest_main.cc
index 874bae72d8abd9d4e62e35fb3f32d75f6c14f057..17b6114c13e48896ca960e4570c609e46120b44e 100644
--- a/gpu/command_buffer/common/unittest_main.cc
+++ b/gpu/command_buffer/common/unittest_main.cc
@@ -5,11 +5,16 @@
#include "base/at_exit.h"
#include "base/bind.h"
#include "base/command_line.h"
+#include "base/message_loop/message_loop.h"
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_nsautorelease_pool.h"
+#endif
+
namespace {
class NoAtExitBaseTestSuite : public base::TestSuite {
@@ -20,6 +25,7 @@ class NoAtExitBaseTestSuite : public base::TestSuite {
};
int RunTestSuite(int argc, char** argv) {
+ base::MessageLoop message_loop;
return NoAtExitBaseTestSuite(argc, argv).Run();
}
@@ -33,6 +39,9 @@ int main(int argc, char** argv) {
base::AtExitManager exit_manager;
#endif
base::CommandLine::Init(argc, argv);
+#if defined(OS_MACOSX)
+ base::mac::ScopedNSAutoreleasePool autorelease_pool;
+#endif
testing::InitGoogleMock(&argc, argv);
return base::LaunchUnitTests(argc,
argv,
« no previous file with comments | « gpu/command_buffer/client/ring_buffer_test.cc ('k') | gpu/command_buffer/service/gpu_scheduler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698