blob: 25a3d9ffddb258c2f272158ad8a6b59947c20da0 [file] [log] [blame]
Michael Martisa967f632018-08-10 10:39:00 +10001// 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 Abe7ac22bb2018-11-08 00:29:25 +09005#include <base/at_exit.h>
Michael Martisa967f632018-08-10 10:39:00 +10006#include <base/threading/thread_task_runner_handle.h>
Michael Martisa967f632018-08-10 10:39:00 +10007#include <brillo/message_loops/base_message_loop.h>
8#include <brillo/test_helpers.h>
Qijiang Fan7da812d2019-11-26 10:48:46 +09009#include <mojo/core/embedder/embedder.h>
10#include <mojo/core/embedder/scoped_ipc_support.h>
Michael Martisa967f632018-08-10 10:39:00 +100011
12int main(int argc, char** argv) {
13 SetUpTests(&argc, argv, true);
Hidehiko Abe7ac22bb2018-11-08 00:29:25 +090014 base::AtExitManager at_exit;
Michael Martisa967f632018-08-10 10:39:00 +100015
16 (new brillo::BaseMessageLoop())->SetAsCurrent();
17
Qijiang Fan7da812d2019-11-26 10:48:46 +090018 mojo::core::Init();
19 mojo::core::ScopedIPCSupport _(
20 base::ThreadTaskRunnerHandle::Get(),
21 mojo::core::ScopedIPCSupport::ShutdownPolicy::FAST);
Michael Martisa967f632018-08-10 10:39:00 +100022
23 return RUN_ALL_TESTS();
24}