Chromium Code Reviews| Index: mojo/public/cpp/application/lib/application_test_base.cc |
| diff --git a/mojo/public/cpp/application/lib/application_test_base.cc b/mojo/public/cpp/application/lib/application_test_base.cc |
| index 406c826d4de16d0001cc78c976c55e66ba31aa18..5cf6939a7669adcfc6db22092e48ce5978a39d81 100644 |
| --- a/mojo/public/cpp/application/lib/application_test_base.cc |
| +++ b/mojo/public/cpp/application/lib/application_test_base.cc |
| @@ -17,6 +17,8 @@ namespace { |
| // Share the application command-line arguments with multiple application tests. |
| Array<String> g_args; |
| +String g_url; |
|
viettrungluu
2015/03/10 15:31:52
No comment?
(Also, the seemingly-random order of
Nick Bray (chromium)
2015/03/10 19:39:00
Done.
|
| + |
| // Application request handle passed from the shell in MojoMain, stored in |
| // between SetUp()/TearDown() so we can (re-)intialize new ApplicationImpls. |
| InterfaceRequest<Application> g_application_request; |
| @@ -51,6 +53,7 @@ class ShellAndArgumentGrabber : public Application { |
| Array<String> args, |
| const mojo::String& url) override { |
| *args_ = args.Pass(); |
| + g_url = url; |
| g_application_request = binding_.Unbind(); |
| g_shell = shell.Pass(); |
| } |
| @@ -74,6 +77,10 @@ const Array<String>& Args() { |
| return g_args; |
| } |
| +const String& Url() { |
| + return g_url; |
| +} |
| + |
| MojoResult RunAllTests(MojoHandle application_request_handle) { |
| { |
| // This loop is used for init, and then destroyed before running tests. |
| @@ -140,7 +147,7 @@ void ApplicationTestBase::SetUp() { |
| g_application_request.Pass()); |
| // Fake application initialization with the given command line arguments. |
| - application_impl_->Initialize(g_shell.Pass(), g_args.Clone(), ""); |
| + application_impl_->Initialize(g_shell.Pass(), g_args.Clone(), g_url); |
|
viettrungluu
2015/03/10 15:31:52
I agree that this is probably right, and that pass
|
| } |
| void ApplicationTestBase::TearDown() { |