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