Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 // Copied from mojo/edk/test/run_all_perftests.cc. | 5 // Copied from mojo/edk/test/run_all_perftests.cc. |
| 6 | 6 |
| 7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/test/perf_test_suite.h" | 8 #include "base/test/perf_test_suite.h" |
| 9 #include "base/test/test_io_thread.h" | |
| 9 #include "mojo/edk/embedder/embedder.h" | 10 #include "mojo/edk/embedder/embedder.h" |
| 11 #include "mojo/edk/test/scoped_ipc_support.h" | |
| 12 #include "mojo/edk/test/test_support_impl.h" | |
| 10 | 13 |
| 11 int main(int argc, char** argv) { | 14 int main(int argc, char** argv) { |
| 12 base::PerfTestSuite test(argc, argv); | 15 base::PerfTestSuite test(argc, argv); |
| 13 | 16 |
| 14 mojo::edk::Init(); | 17 mojo::edk::Init(); |
| 18 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); | |
| 19 // Leak this because its destructor calls mojo::edk::ShutdownIPCSupport which | |
| 20 // really does nothing in the new EDK but does depend on the current message | |
| 21 // loop, which is destructed inside base::LaunchUnitTests. | |
|
Ken Rockot(use gerrit already)
2017/01/06 18:15:07
This is actually not true anymore. ShutdownIPCSupp
jam
2017/01/06 18:24:18
ah ok, I had copied that from the other run_all_pe
| |
| 22 new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner()); | |
| 23 mojo::test::TestSupport::Init(new mojo::edk::test::TestSupportImpl()); | |
| 15 | 24 |
| 16 return test.Run(); | 25 return test.Run(); |
| 17 } | 26 } |
| OLD | NEW |