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

Unified Diff: gpu/angle_unittest_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/GLES2/gl2chromium_autogen.h ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/angle_unittest_main.cc
diff --git a/gpu/angle_unittest_main.cc b/gpu/angle_unittest_main.cc
index 67e91ede1c648d0939426e59bd11cb1db65e51b5..e7667f635cdeffb5274b7727f88b5906e875a794 100644
--- a/gpu/angle_unittest_main.cc
+++ b/gpu/angle_unittest_main.cc
@@ -3,22 +3,33 @@
// 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"
+#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"
#include "third_party/angle/include/GLSLANG/ShaderLang.h"
+namespace {
+
+int RunHelper(base::TestSuite* test_suite) {
+ base::MessageLoopForIO message_loop;
+ return test_suite->Run();
+}
+
+} // namespace
+
int main(int argc, char** argv) {
- // On Android, AtExitManager is created in
- // testing/android/native_test_wrapper.cc before main() is called.
- // The same thing is also done in base/test/test_suite.cc
-#if !defined(OS_ANDROID)
- base::AtExitManager exit_manager;
-#endif
CommandLine::Init(argc, argv);
testing::InitGoogleMock(&argc, argv);
ShInitialize();
- int rt = RUN_ALL_TESTS();
+ base::TestSuite test_suite(argc, argv);
+ int rt = base::LaunchUnitTestsSerially(
+ argc,
+ argv,
+ base::Bind(&RunHelper, base::Unretained(&test_suite)));
ShFinalize();
return rt;
}
« no previous file with comments | « gpu/GLES2/gl2chromium_autogen.h ('k') | gpu/command_buffer/build_gles2_cmd_buffer.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698