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

Side by Side Diff: mojo/edk/test/run_all_perftests.cc

Issue 1488853002: Add multiplexing of message pipes in the new EDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tsepez review comments 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 unified diff | Download patch
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper_unittest.cc ('k') | mojo/mojo_edk.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/test/perf_test_suite.h" 6 #include "base/test/perf_test_suite.h"
7 #include "base/test/test_io_thread.h"
7 #include "mojo/edk/embedder/embedder.h" 8 #include "mojo/edk/embedder/embedder.h"
9 #include "mojo/edk/test/multiprocess_test_helper.h"
10 #include "mojo/edk/test/scoped_ipc_support.h"
8 #include "mojo/edk/test/test_support_impl.h" 11 #include "mojo/edk/test/test_support_impl.h"
9 #include "mojo/public/tests/test_support_private.h" 12 #include "mojo/public/tests/test_support_private.h"
10 13
11 int main(int argc, char** argv) { 14 int main(int argc, char** argv) {
12 mojo::edk::Init(); 15 base::PerfTestSuite test(argc, argv);
13 mojo::test::TestSupport::Init(new mojo::edk::test::TestSupportImpl()); 16
17 // Must be run before mojo::edk::Init.
18 if (base::CommandLine::ForCurrentProcess()->HasSwitch(
19 mojo::edk::test::kBrokerHandleSwitch)) {
20 mojo::edk::PreInitializeChildProcess();
21 }
14 22
15 // TODO(use_chrome_edk): temporary to force new EDK. 23 // TODO(use_chrome_edk): temporary to force new EDK.
16 base::PerfTestSuite test(argc, argv);
17 base::CommandLine::ForCurrentProcess()->AppendSwitch("--use-new-edk"); 24 base::CommandLine::ForCurrentProcess()->AppendSwitch("--use-new-edk");
18 25
26 mojo::edk::Init();
27 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart);
28 // Leak this because its destructor calls mojo::edk::ShutdownIPCSupport which
29 // really does nothing in the new EDK but does depend on the current message
30 // loop, which is destructed inside base::LaunchUnitTests.
31 new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner());
32 mojo::test::TestSupport::Init(new mojo::edk::test::TestSupportImpl());
33
19 return test.Run(); 34 return test.Run();
20 } 35 }
OLDNEW
« no previous file with comments | « mojo/edk/test/multiprocess_test_helper_unittest.cc ('k') | mojo/mojo_edk.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698