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; |
} |