xref: /aosp_15_r20/external/cronet/ipc/run_all_perftests.cc (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1*6777b538SAndroid Build Coastguard Worker // Copyright 2013 The Chromium Authors
2*6777b538SAndroid Build Coastguard Worker // Use of this source code is governed by a BSD-style license that can be
3*6777b538SAndroid Build Coastguard Worker // found in the LICENSE file.
4*6777b538SAndroid Build Coastguard Worker 
5*6777b538SAndroid Build Coastguard Worker // Copied from mojo/core/test/run_all_perftests.cc.
6*6777b538SAndroid Build Coastguard Worker 
7*6777b538SAndroid Build Coastguard Worker #include "base/command_line.h"
8*6777b538SAndroid Build Coastguard Worker #include "base/test/perf_test_suite.h"
9*6777b538SAndroid Build Coastguard Worker #include "base/test/test_io_thread.h"
10*6777b538SAndroid Build Coastguard Worker #include "build/build_config.h"
11*6777b538SAndroid Build Coastguard Worker #include "mojo/core/embedder/embedder.h"
12*6777b538SAndroid Build Coastguard Worker #include "mojo/core/embedder/scoped_ipc_support.h"
13*6777b538SAndroid Build Coastguard Worker #include "mojo/core/test/test_support_impl.h"
14*6777b538SAndroid Build Coastguard Worker 
main(int argc,char ** argv)15*6777b538SAndroid Build Coastguard Worker int main(int argc, char** argv) {
16*6777b538SAndroid Build Coastguard Worker   base::PerfTestSuite test(argc, argv);
17*6777b538SAndroid Build Coastguard Worker 
18*6777b538SAndroid Build Coastguard Worker   mojo::core::Init();
19*6777b538SAndroid Build Coastguard Worker   base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart);
20*6777b538SAndroid Build Coastguard Worker   mojo::core::ScopedIPCSupport ipc_support(
21*6777b538SAndroid Build Coastguard Worker       test_io_thread.task_runner(),
22*6777b538SAndroid Build Coastguard Worker       mojo::core::ScopedIPCSupport::ShutdownPolicy::CLEAN);
23*6777b538SAndroid Build Coastguard Worker   mojo::test::TestSupport::Init(new mojo::core::test::TestSupportImpl());
24*6777b538SAndroid Build Coastguard Worker 
25*6777b538SAndroid Build Coastguard Worker   return test.Run();
26*6777b538SAndroid Build Coastguard Worker }
27