summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/common/unittest_main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gpu/command_buffer/common/unittest_main.cc')
-rw-r--r--gpu/command_buffer/common/unittest_main.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gpu/command_buffer/common/unittest_main.cc b/gpu/command_buffer/common/unittest_main.cc
index 874bae7..17b6114 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,