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 #include "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/test/perf_test_suite.h" | 6 #include "base/test/perf_test_suite.h" |
7 #include "base/test/test_io_thread.h" | 7 #include "base/test/test_io_thread.h" |
8 #include "mojo/edk/embedder/embedder.h" | 8 #include "mojo/edk/embedder/embedder.h" |
9 #include "mojo/edk/test/multiprocess_test_helper.h" | 9 #include "mojo/edk/test/multiprocess_test_helper.h" |
10 #include "mojo/edk/test/scoped_ipc_support.h" | 10 #include "mojo/edk/test/scoped_ipc_support.h" |
11 #include "mojo/edk/test/test_support_impl.h" | 11 #include "mojo/edk/test/test_support_impl.h" |
12 #include "mojo/public/tests/test_support_private.h" | 12 #include "mojo/public/tests/test_support_private.h" |
13 | 13 |
14 int main(int argc, char** argv) { | 14 int main(int argc, char** argv) { |
15 base::PerfTestSuite test(argc, argv); | 15 base::PerfTestSuite test(argc, argv); |
16 | 16 |
17 // TODO(use_chrome_edk): temporary to force new EDK. | |
18 base::CommandLine::ForCurrentProcess()->AppendSwitch("--use-new-edk"); | |
19 | |
20 mojo::edk::Init(); | 17 mojo::edk::Init(); |
21 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); | 18 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); |
22 // Leak this because its destructor calls mojo::edk::ShutdownIPCSupport which | 19 // Leak this because its destructor calls mojo::edk::ShutdownIPCSupport which |
23 // really does nothing in the new EDK but does depend on the current message | 20 // really does nothing in the new EDK but does depend on the current message |
24 // loop, which is destructed inside base::LaunchUnitTests. | 21 // loop, which is destructed inside base::LaunchUnitTests. |
25 new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner()); | 22 new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner()); |
26 mojo::test::TestSupport::Init(new mojo::edk::test::TestSupportImpl()); | 23 mojo::test::TestSupport::Init(new mojo::edk::test::TestSupportImpl()); |
27 | 24 |
28 return test.Run(); | 25 return test.Run(); |
29 } | 26 } |
OLD | NEW |