Chromium Code Reviews| Index: mojo/public/cpp/application/lib/application_test_main.cc |
| diff --git a/mojo/public/cpp/application/lib/application_test_main.cc b/mojo/public/cpp/application/lib/application_test_main.cc |
| index 6cdfb0d7fa53eab272d69fdd3967e28ce3a0a038..65a65b25ac21d54bc60bafea053b2042369cfb05 100644 |
| --- a/mojo/public/cpp/application/lib/application_test_main.cc |
| +++ b/mojo/public/cpp/application/lib/application_test_main.cc |
| @@ -21,14 +21,14 @@ MojoResult MojoMain(MojoHandle shell_handle) { |
| // Construct an ApplicationImpl just for the GTEST commandline arguments. |
| // GTEST command line arguments are supported amid application arguments: |
| - // $ mojo_shell 'mojo:example_apptests arg1 --gtest_filter=foo arg2' |
| + // $ mojo_shell mojo:example_apptests \ |
|
jamesr
2014/11/24 20:22:40
this breaks the android build:
FAILED: /b/build/g
|
| + // --args-for='mojo:example_apptests arg1 --gtest_filter=foo arg2' |
| mojo::ApplicationDelegate dummy_application_delegate; |
| mojo::ApplicationImpl app(&dummy_application_delegate, shell_handle); |
| MOJO_CHECK(app.WaitForInitialize()); |
| // InitGoogleTest expects (argc + 1) elements, including a terminating NULL. |
| // It also removes GTEST arguments from |argv| and updates the |argc| count. |
| - // TODO(msw): Provide tests access to these actual command line arguments. |
| const std::vector<std::string>& args = app.args(); |
| MOJO_CHECK(args.size() < |
| static_cast<size_t>(std::numeric_limits<int>::max())); |
| @@ -40,6 +40,7 @@ MojoResult MojoMain(MojoHandle shell_handle) { |
| testing::InitGoogleTest(&argc, const_cast<char**>(&(argv[0]))); |
| mojo::test::SetShellHandle(app.UnbindShell()); |
| + mojo::test::InitializeArgs(argc, argv); |
| } |
| int result = RUN_ALL_TESTS(); |