blob: a5a22950d3415cd13ab322db0b4f461904f7bb0a [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
5#include <base/command_line.h>
6#include <base/threading/thread_task_runner_handle.h>
7#include <brillo/flag_helper.h>
8#include <brillo/message_loops/base_message_loop.h>
9#include <brillo/test_helpers.h>
10#include <mojo/edk/embedder/embedder.h>
11#include <mojo/edk/embedder/process_delegate.h>
12
13// A ProcessDelegate that does nothing upon IPC system shutdown.
14class DoNothingProcessDelegate : public mojo::edk::ProcessDelegate {
15 public:
16 void OnShutdownComplete() override {}
17};
18
19int main(int argc, char** argv) {
20 SetUpTests(&argc, argv, true);
21
22 (new brillo::BaseMessageLoop())->SetAsCurrent();
23
24 mojo::edk::Init();
25 mojo::edk::InitIPCSupport(new DoNothingProcessDelegate(),
26 base::ThreadTaskRunnerHandle::Get());
27
28 return RUN_ALL_TESTS();
29}