OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <memory> | 5 #include <memory> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/test/launcher/unit_test_launcher.h" | 9 #include "base/test/launcher/unit_test_launcher.h" |
10 #include "base/test/test_io_thread.h" | 10 #include "base/test/test_io_thread.h" |
11 #include "base/test/test_suite.h" | 11 #include "base/test/test_suite.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 | 13 |
14 #if !defined(OS_IOS) | 14 #if !defined(OS_IOS) |
15 #include "mojo/edk/embedder/embedder.h" // nogncheck | 15 #include "mojo/edk/embedder/embedder.h" // nogncheck |
16 #include "mojo/edk/test/scoped_ipc_support.h" // nogncheck | |
17 #endif | 16 #endif |
18 | 17 |
19 int main(int argc, char** argv) { | 18 int main(int argc, char** argv) { |
20 base::TestSuite test_suite(argc, argv); | 19 base::TestSuite test_suite(argc, argv); |
21 | 20 |
22 #if !defined(OS_IOS) | 21 #if !defined(OS_IOS) |
23 mojo::edk::Init(); | 22 mojo::edk::Init(); |
24 base::TestIOThread test_io_thread(base::TestIOThread::kAutoStart); | |
25 std::unique_ptr<mojo::edk::test::ScopedIPCSupport> ipc_support; | |
26 ipc_support.reset( | |
27 new mojo::edk::test::ScopedIPCSupport(test_io_thread.task_runner())); | |
28 #endif | 23 #endif |
29 | 24 |
30 return base::LaunchUnitTests( | 25 return base::LaunchUnitTests( |
31 argc, argv, | 26 argc, argv, |
32 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); | 27 base::Bind(&base::TestSuite::Run, base::Unretained(&test_suite))); |
33 } | 28 } |
OLD | NEW |