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

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

Issue 2549363004: Multiprocess test client: Android child process launcher rework. (Closed)
Patch Set: Fixed tests Created 4 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
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/multiprocess_test.h" 6 #include "base/test/multiprocess_test.h"
7 #include "base/test/perf_test_suite.h" 7 #include "base/test/perf_test_suite.h"
8 #include "base/test/test_io_thread.h" 8 #include "base/test/test_io_thread.h"
9 #include "mojo/edk/embedder/embedder.h" 9 #include "mojo/edk/embedder/embedder.h"
10 #include "mojo/edk/test/multiprocess_test_helper.h" 10 #include "mojo/edk/test/multiprocess_test_helper.h"
11 #include "mojo/edk/test/scoped_ipc_support.h" 11 #include "mojo/edk/test/scoped_ipc_support.h"
12 #include "mojo/edk/test/test_support_impl.h" 12 #include "mojo/edk/test/test_support_impl.h"
13 #include "mojo/public/tests/test_support_private.h" 13 #include "mojo/public/tests/test_support_private.h"
14 14
15 int main(int argc, char** argv) {
16 #if defined(OS_ANDROID) 15 #if defined(OS_ANDROID)
17 base::InitAndroidMultiProcessTestHelper(main); 16 #include "base/test/android/android_main_function_thunk.h"
17
18 int main(int argc, char** argv);
19 namespace {
20 // Needed for multiprocess tests to find the main function.
21 base::android::AndroidMainFunctionThunk main_thunk(&main);
22 }
18 #endif 23 #endif
19 24
25 int main(int argc, char** argv) {
20 base::PerfTestSuite test(argc, argv); 26 base::PerfTestSuite test(argc, argv);
21 27
22 mojo::edk::Init(); 28 mojo::edk::Init();
23 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); 29 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart);
24 // Leak this because its destructor calls mojo::edk::ShutdownIPCSupport which 30 // Leak this because its destructor calls mojo::edk::ShutdownIPCSupport which
25 // really does nothing in the new EDK but does depend on the current message 31 // really does nothing in the new EDK but does depend on the current message
26 // loop, which is destructed inside base::LaunchUnitTests. 32 // loop, which is destructed inside base::LaunchUnitTests.
27 new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner()); 33 new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner());
28 mojo::test::TestSupport::Init(new mojo::edk::test::TestSupportImpl()); 34 mojo::test::TestSupport::Init(new mojo::edk::test::TestSupportImpl());
29 35
30 return test.Run(); 36 return test.Run();
31 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698