| Index: shell/shell_apptest.cc
|
| diff --git a/shell/shell_apptest.cc b/shell/shell_apptest.cc
|
| index 1011e241c7f8beb1ff3ee88af6959f862b320393..7bc5e85afb2baa471cdd928f5cc2bfdac3495b53 100644
|
| --- a/shell/shell_apptest.cc
|
| +++ b/shell/shell_apptest.cc
|
| @@ -13,7 +13,9 @@
|
| #include "mojo/data_pipe_utils/data_pipe_utils.h"
|
| #include "mojo/public/cpp/application/application_impl.h"
|
| #include "mojo/public/cpp/application/application_test_base.h"
|
| +#include "mojo/public/cpp/application/connect.h"
|
| #include "mojo/public/cpp/system/macros.h"
|
| +#include "mojo/public/interfaces/application/application_connector.mojom.h"
|
| #include "mojo/services/http_server/cpp/http_server_util.h"
|
| #include "mojo/services/http_server/interfaces/http_server.mojom.h"
|
| #include "mojo/services/http_server/interfaces/http_server_factory.mojom.h"
|
| @@ -195,4 +197,21 @@ TEST_F(ShellAppTest, MojoURLQueryHandling) {
|
| base::RunLoop().Run();
|
| }
|
|
|
| +TEST_F(ShellAppTest, ApplicationConnector) {
|
| + mojo::ApplicationConnectorPtr app_connector;
|
| + app_connector.Bind(application_impl()->CreateApplicationConnector());
|
| +
|
| + PingablePtr pingable;
|
| + ConnectToService(app_connector.get(), "mojo:pingable_app", &pingable);
|
| + auto callback = [this](const String& app_url, const String& connection_url,
|
| + const String& message) {
|
| + EXPECT_TRUE(EndsWith(app_url, "/pingable_app.mojo", true));
|
| + EXPECT_EQ(app_url, connection_url);
|
| + EXPECT_EQ("hello", message);
|
| + base::MessageLoop::current()->Quit();
|
| + };
|
| + pingable->Ping("hello", callback);
|
| + base::RunLoop().Run();
|
| +}
|
| +
|
| } // namespace
|
|
|