Index: mojo/edk/system/run_all_unittests.cc |
diff --git a/mojo/edk/system/run_all_unittests.cc b/mojo/edk/system/run_all_unittests.cc |
index b68fd83e9d0e8d1b65c99615247490c2d783e500..4421aa69bc25944ac1f06c802c6fc8637693903a 100644 |
--- a/mojo/edk/system/run_all_unittests.cc |
+++ b/mojo/edk/system/run_all_unittests.cc |
@@ -5,9 +5,11 @@ |
#include "base/bind.h" |
#include "base/command_line.h" |
#include "base/test/launcher/unit_test_launcher.h" |
+#include "base/test/test_io_thread.h" |
#include "base/test/test_suite.h" |
#include "mojo/edk/embedder/embedder.h" |
#include "mojo/edk/test/multiprocess_test_helper.h" |
+#include "mojo/edk/test/scoped_ipc_support.h" |
#include "testing/gtest/include/gtest/gtest.h" |
int main(int argc, char** argv) { |
@@ -31,6 +33,12 @@ int main(int argc, char** argv) { |
mojo::edk::Init(); |
+ base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); |
+ // Leak this because its destructor calls mojo::edk::ShutdownIPCSupport which |
+ // really does nothing in the new EDK but does depend on the current message |
+ // loop, which is destructed inside base::LaunchUnitTests. |
+ new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner()); |
+ |
return base::LaunchUnitTests( |
argc, argv, |
base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |