crashpad::test::ChildLauncher Class Reference

Creates a child process for testing. Uses gtest `ASSERT_*` to indicate failure. The child's output is passed through a pipe and is available via stdout_read_handle(), and the child's input is attached to a second pipe available via stdin_write_handle(). More...

`#include "test/win/child_launcher.h"`

## Public Member Functions

| ChildLauncher (const base::FilePath &executable, const std::wstring &command_line)
| Creates the object. executable will be escaped and prepended to command_line to build the command line of the child.
void | Start ()
| Starts the child process, after which the handle functions below will be valid. More...
DWORD | WaitForExit ()
| Waits for the child process to exit. More...
HANDLE | process_handle () const
| The child process's `HANDLE`.
HANDLE | main_thread_handle () const
| The child process's main thread's `HANDLE`.
HANDLE | stdout_read_handle () const
| The read end of a pipe attached to the child's stdout.
HANDLE | stdin_write_handle () const
| The write end of a pipe attached to the child's stdin.

## Detailed Description

Creates a child process for testing. Uses gtest `ASSERT_*` to indicate failure. The child's output is passed through a pipe and is available via stdout_read_handle(), and the child's input is attached to a second pipe available via stdin_write_handle().

## Member Function Documentation

## Start()

void crashpad::test::ChildLauncher::Start | ( |  | ) |

Starts the child process, after which the handle functions below will be valid.

Errors are signaled via gtest assertions. This method may be invoked via `ASSERT_NO_FATAL_FAILURE()` to assert that it succeeds.

## WaitForExit()

DWORD crashpad::test::ChildLauncher::WaitForExit | ( |  | ) |

Waits for the child process to exit.

Returns
  The process exit code.

The documentation for this class was generated from the following files:

- test/win/child_launcher.h
- test/win/child_launcher.cc