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

Unified Diff: mojo/edk/system/run_all_unittests.cc

Issue 1485573002: Remove SimpleBroker and instead use the production broker implementation in tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review comment Created 5 years, 1 month 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 | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/simple_broker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b68f6e207e4c415f350b686b3d3f22eba16f9800..71e1465829e83ab2aaeb34ada76f850b1462fe65 100644
--- a/mojo/edk/system/run_all_unittests.cc
+++ b/mojo/edk/system/run_all_unittests.cc
@@ -7,6 +7,7 @@
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "mojo/edk/embedder/embedder.h"
+#include "mojo/edk/test/multiprocess_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
int main(int argc, char** argv) {
@@ -17,8 +18,15 @@ int main(int argc, char** argv) {
#if !defined(OS_ANDROID)
testing::GTEST_FLAG(death_test_style) = "threadsafe";
#endif
- mojo::edk::Init();
base::TestSuite test_suite(argc, argv);
+
+ // Must be run before mojo::edk::Init.
+ if (base::CommandLine::ForCurrentProcess()->HasSwitch(
+ mojo::edk::test::kBrokerHandleSwitch)) {
+ mojo::edk::PreInitializeChildProcess();
+ }
+
+ mojo::edk::Init();
// TODO(use_chrome_edk): temporary to force new EDK.
base::CommandLine::ForCurrentProcess()->AppendSwitch("--use-new-edk");
« no previous file with comments | « mojo/edk/system/BUILD.gn ('k') | mojo/edk/system/simple_broker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698