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

Unified Diff: content/test/run_all_unittests.cc

Issue 1501343002: Prepare chrome to use the new Mojo EDK by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable turning on in this cl Created 5 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 | « content/test/BUILD.gn ('k') | mojo/edk/embedder/embedder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/run_all_unittests.cc
diff --git a/content/test/run_all_unittests.cc b/content/test/run_all_unittests.cc
index d4fbd20015aab09085a57ebf98d6d1717c85bd21..e74439f97b58d34853bfb5bd59b2e7ec0333f9d3 100644
--- a/content/test/run_all_unittests.cc
+++ b/content/test/run_all_unittests.cc
@@ -3,10 +3,13 @@
// found in the LICENSE file.
#include "base/bind.h"
-#include "base/test/launcher/unit_test_launcher.h"
+#include "base/command_line.h"
+#include "base/test/launcher/unit_test_launcher.h"
+#include "base/test/test_io_thread.h"
#include "content/app/mojo/mojo_init.h"
#include "content/public/test/unittest_test_suite.h"
-#include "content/test/content_test_suite.h"
+#include "content/test/content_test_suite.h"
+#include "third_party/mojo/src/mojo/edk/test/scoped_ipc_support.h"
#if defined(OS_ANDROID)
#include "base/android/jni_android.h"
@@ -23,6 +26,12 @@ int main(int argc, char** argv) {
new content::ContentTestSuite(argc, argv));
#if !defined(OS_IOS)
content::InitializeMojo();
+ base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart);
yzshen1 2015/12/10 17:52:25 Is line 29 needed if we don't use-new-edk?
jam 2015/12/10 18:02:48 no, but i figured no harm done in leaving it. as o
+ scoped_ptr<mojo::test::ScopedIPCSupport> ipc_support;
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch("use-new-edk")) {
+ ipc_support.reset(new mojo::test::ScopedIPCSupport(
+ test_io_thread.task_runner()));
+ }
#endif
return base::LaunchUnitTests(
« no previous file with comments | « content/test/BUILD.gn ('k') | mojo/edk/embedder/embedder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698