Further refine mojo_example_apptests.

Destroy MojoMain's RunLoop before executing tests.
Reuse the shell handle for multiple test app instances.
Add ApplicationImpl::UnbindShell for message pipe reuse.

Add Apptest, a GTEST base class for application testing.

TODO: Support/Exemplify actual command line arg use.

BUG=392646
TEST=mojo_shell 'mojo:mojo_example_apptests <gtest_args>' still works.
R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/654103002

Cr-Commit-Position: refs/heads/master@{#300155}


CrOS-Libchrome-Original-Commit: 1b38080e455f6ee9e47e97bc1e03c8565111cfc1
3 files changed
tree: a1200499d0595fd6c6add4397b889c9e8a8903f1
  1. base/
  2. build/
  3. components/
  4. dbus/
  5. device/
  6. ipc/
  7. mojo/
  8. testing/
  9. third_party/
  10. ui/