Michael Martis | a967f63 | 2018-08-10 10:39:00 +1000 | [diff] [blame] | 1 | // Copyright 2018 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Hidehiko Abe | 7ac22bb | 2018-11-08 00:29:25 +0900 | [diff] [blame] | 5 | #include <base/at_exit.h> |
Michael Martis | a967f63 | 2018-08-10 10:39:00 +1000 | [diff] [blame] | 6 | #include <base/threading/thread_task_runner_handle.h> |
Michael Martis | a967f63 | 2018-08-10 10:39:00 +1000 | [diff] [blame] | 7 | #include <brillo/message_loops/base_message_loop.h> |
| 8 | #include <brillo/test_helpers.h> |
Qijiang Fan | 7da812d | 2019-11-26 10:48:46 +0900 | [diff] [blame] | 9 | #include <mojo/core/embedder/embedder.h> |
| 10 | #include <mojo/core/embedder/scoped_ipc_support.h> |
Michael Martis | a967f63 | 2018-08-10 10:39:00 +1000 | [diff] [blame] | 11 | |
| 12 | int main(int argc, char** argv) { |
| 13 | SetUpTests(&argc, argv, true); |
Hidehiko Abe | 7ac22bb | 2018-11-08 00:29:25 +0900 | [diff] [blame] | 14 | base::AtExitManager at_exit; |
Michael Martis | a967f63 | 2018-08-10 10:39:00 +1000 | [diff] [blame] | 15 | |
| 16 | (new brillo::BaseMessageLoop())->SetAsCurrent(); |
| 17 | |
Qijiang Fan | 7da812d | 2019-11-26 10:48:46 +0900 | [diff] [blame] | 18 | mojo::core::Init(); |
| 19 | mojo::core::ScopedIPCSupport _( |
| 20 | base::ThreadTaskRunnerHandle::Get(), |
| 21 | mojo::core::ScopedIPCSupport::ShutdownPolicy::FAST); |
Michael Martis | a967f63 | 2018-08-10 10:39:00 +1000 | [diff] [blame] | 22 | |
| 23 | return RUN_ALL_TESTS(); |
| 24 | } |