blob: 5520f4e61422816f29ba9f2ff6b5d378615b7372 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef MOJO_SHELL_TESTS_UTIL_H_
#define MOJO_SHELL_TESTS_UTIL_H_
#include <string>
#include "base/memory/scoped_ptr.h"
namespace base {
class Process;
}
namespace mojo {
class Connection;
class Connector;
class Identity;
namespace shell {
namespace test {
// Starts the process @ |target_exe_name| and connects to it as |target| using
// |connector|, returning the connection & the process.
// This blocks until the connection is established/rejected by the shell.
scoped_ptr<Connection> LaunchAndConnectToProcess(
const std::string& target_exe_name,
const Identity target,
mojo::Connector* connector,
base::Process* process);
} // namespace test
} // namespace shell
} // namespace mojo
#endif // MOJO_SHELL_TESTS_UTIL_H_
|