Index: ipc/mojo/run_all_unittests.cc |
diff --git a/ipc/mojo/run_all_unittests.cc b/ipc/mojo/run_all_unittests.cc |
index 63824745c0a181a3a1684c32e14a686c35f7962b..fd3c611b9744c936442e8897a1329e973ea9b9c5 100644 |
--- a/ipc/mojo/run_all_unittests.cc |
+++ b/ipc/mojo/run_all_unittests.cc |
@@ -13,30 +13,14 @@ |
#include "base/test/test_file_util.h" |
#endif |
-namespace { |
- |
-class NoAtExitBaseTestSuite : public base::TestSuite { |
- public: |
- NoAtExitBaseTestSuite(int argc, char** argv) |
- : base::TestSuite(argc, argv, false) { |
- } |
-}; |
- |
-int RunTestSuite(int argc, char** argv) { |
- return NoAtExitBaseTestSuite(argc, argv).Run(); |
-} |
- |
-} // namespace |
- |
int main(int argc, char** argv) { |
- mojo::embedder::Init(); |
#if defined(OS_ANDROID) |
JNIEnv* env = base::android::AttachCurrentThread(); |
base::RegisterContentUriTestUtils(env); |
-#else |
- base::AtExitManager at_exit; |
#endif |
- return base::LaunchUnitTestsSerially(argc, |
- argv, |
- base::Bind(&RunTestSuite, argc, argv)); |
+ base::TestSuite test_suite(argc, argv); |
+ mojo::embedder::Init(); |
+ return base::LaunchUnitTestsSerially( |
+ argc, argv, |
+ base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
} |