Avi Drissman | ea1be23 | 2022-09-14 23:29:06 | [diff] [blame] | 1 | // Copyright 2013 The Chromium Authors |
sammc | e4d0abd | 2016-03-07 22:38:04 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Ken Rockot | 8a7f35f | 2018-07-04 19:40:56 | [diff] [blame] | 5 | // Copied from mojo/core/test/run_all_perftests.cc. |
sammc | e4d0abd | 2016-03-07 22:38:04 | [diff] [blame] | 6 | |
| 7 | #include "base/command_line.h" |
| 8 | #include "base/test/perf_test_suite.h" |
jam | ca86c9e | 2017-01-06 19:55:57 | [diff] [blame] | 9 | #include "base/test/test_io_thread.h" |
Robert Sesek | 72ba54c | 2018-12-11 20:05:34 | [diff] [blame] | 10 | #include "build/build_config.h" |
Ken Rockot | 8a7f35f | 2018-07-04 19:40:56 | [diff] [blame] | 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" |
sammc | e4d0abd | 2016-03-07 22:38:04 | [diff] [blame] | 14 | |
| 15 | int main(int argc, char** argv) { |
| 16 | base::PerfTestSuite test(argc, argv); |
| 17 | |
Ken Rockot | 8a7f35f | 2018-07-04 19:40:56 | [diff] [blame] | 18 | mojo::core::Init(); |
jam | ca86c9e | 2017-01-06 19:55:57 | [diff] [blame] | 19 | base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); |
Ken Rockot | 8a7f35f | 2018-07-04 19:40:56 | [diff] [blame] | 20 | mojo::core::ScopedIPCSupport ipc_support( |
rockot | e5180e0e | 2017-01-13 12:24:00 | [diff] [blame] | 21 | test_io_thread.task_runner(), |
Ken Rockot | 8a7f35f | 2018-07-04 19:40:56 | [diff] [blame] | 22 | mojo::core::ScopedIPCSupport::ShutdownPolicy::CLEAN); |
| 23 | mojo::test::TestSupport::Init(new mojo::core::test::TestSupportImpl()); |
sammc | e4d0abd | 2016-03-07 22:38:04 | [diff] [blame] | 24 | |
| 25 | return test.Run(); |
| 26 | } |