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

Unified Diff: gpu/command_buffer/tests/gl_tests_main.cc

Issue 761903003: Update from https://crrev.com/306655 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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/tests/gl_test_utils.cc ('k') | gpu/command_buffer/tests/gl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 460ecae94ecb1a57d45c798c619d2fd953c3fd22..8952e4433d2b6697e20ad39856f2f470c7f7ef37 100644
--- a/gpu/command_buffer/tests/gl_tests_main.cc
+++ b/gpu/command_buffer/tests/gl_tests_main.cc
@@ -3,14 +3,17 @@
// found in the LICENSE file.
#include "base/at_exit.h"
+#include "base/bind.h"
#include "base/command_line.h"
#include "base/message_loop/message_loop.h"
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
#endif
+#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/test_suite.h"
#include "gpu/command_buffer/client/gles2_lib.h"
-#include "gpu/command_buffer/tests/gl_test_utils.h"
#include "gpu/config/gpu_util.h"
+#include "testing/gmock/include/gmock/gmock.h"
#include "ui/gl/gl_surface.h"
#if defined(OS_ANDROID)
@@ -18,12 +21,20 @@
#include "ui/gl/android/gl_jni_registrar.h"
#endif
+namespace {
+
+int RunHelper(base::TestSuite* testSuite) {
+ base::MessageLoopForIO message_loop;
+ return testSuite->Run();
+}
+
+} // namespace
+
int main(int argc, char** argv) {
#if defined(OS_ANDROID)
ui::gl::android::RegisterJni(base::android::AttachCurrentThread());
-#else
- base::AtExitManager exit_manager;
#endif
+ base::TestSuite test_suite(argc, argv);
CommandLine::Init(argc, argv);
#if defined(OS_MACOSX)
base::mac::ScopedNSAutoreleasePool pool;
@@ -31,8 +42,9 @@ int main(int argc, char** argv) {
gfx::GLSurface::InitializeOneOff();
::gles2::Initialize();
gpu::ApplyGpuDriverBugWorkarounds(CommandLine::ForCurrentProcess());
- base::MessageLoop main_message_loop;
- return GLTestHelper::RunTests(argc, argv);
+ testing::InitGoogleMock(&argc, argv);
+ return base::LaunchUnitTestsSerially(
+ argc,
+ argv,
+ base::Bind(&RunHelper, base::Unretained(&test_suite)));
}
-
-
« no previous file with comments | « gpu/command_buffer/tests/gl_test_utils.cc ('k') | gpu/command_buffer/tests/gl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698