Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(587)

Unified Diff: shell/shell_apptest.cc

Issue 1919313002: ApplicationImpl::ConnectToServiceDeprecated() -> mojo::ConnectToService() conversion, part 3. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « shell/android/nfc_apptest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shell/shell_apptest.cc
diff --git a/shell/shell_apptest.cc b/shell/shell_apptest.cc
index bf53dc514e5a078010968fb4b1cc7533fc153dbc..f4b8154a5e388325ae76a6af95fc41e0f705a3d3 100644
--- a/shell/shell_apptest.cc
+++ b/shell/shell_apptest.cc
@@ -80,8 +80,8 @@ class ShellHTTPAppTest : public ShellAppTest {
void SetUp() override {
ShellAppTest::SetUp();
- application_impl()->ConnectToServiceDeprecated("mojo:http_server",
- &http_server_factory_);
+ mojo::ConnectToService(application_impl()->shell(), "mojo:http_server",
+ GetProxy(&http_server_factory_));
mojo::NetAddressPtr local_address(mojo::NetAddress::New());
local_address->family = mojo::NetAddressFamily::IPV4;
@@ -119,7 +119,8 @@ class ShellHTTPAppTest : public ShellAppTest {
// Test that we can load apps over http.
TEST_F(ShellHTTPAppTest, Http) {
PingablePtr pingable;
- application_impl()->ConnectToServiceDeprecated(GetURL("app"), &pingable);
+ mojo::ConnectToService(application_impl()->shell(), GetURL("app"),
+ GetProxy(&pingable));
pingable->Ping("hello",
[this](const String& app_url, const String& connection_url,
const String& message) {
@@ -135,7 +136,8 @@ TEST_F(ShellHTTPAppTest, Http) {
// TODO(aa): Test that apps receive the correct URL parameters.
TEST_F(ShellHTTPAppTest, Redirect) {
PingablePtr pingable;
- application_impl()->ConnectToServiceDeprecated(GetURL("redirect"), &pingable);
+ mojo::ConnectToService(application_impl()->shell(), GetURL("redirect"),
+ GetProxy(&pingable));
pingable->Ping("hello",
[this](const String& app_url, const String& connection_url,
const String& message) {
@@ -157,8 +159,10 @@ TEST_F(ShellHTTPAppTest, Redirect) {
TEST_F(ShellHTTPAppTest, MAYBE_QueryHandling) {
PingablePtr pingable1;
PingablePtr pingable2;
- application_impl()->ConnectToServiceDeprecated(GetURL("app?foo"), &pingable1);
- application_impl()->ConnectToServiceDeprecated(GetURL("app?bar"), &pingable2);
+ mojo::ConnectToService(application_impl()->shell(), GetURL("app?foo"),
+ GetProxy(&pingable1));
+ mojo::ConnectToService(application_impl()->shell(), GetURL("app?bar"),
+ GetProxy(&pingable2));
int num_responses = 0;
auto callbacks_builder = [this, &num_responses](int query_index) {
@@ -187,8 +191,8 @@ TEST_F(ShellHTTPAppTest, MAYBE_QueryHandling) {
// mojo: URLs can have querystrings too
TEST_F(ShellAppTest, MojoURLQueryHandling) {
PingablePtr pingable;
- application_impl()->ConnectToServiceDeprecated("mojo:pingable_app?foo",
- &pingable);
+ mojo::ConnectToService(application_impl()->shell(), "mojo:pingable_app?foo",
+ GetProxy(&pingable));
auto callback = [](const String& app_url, const String& connection_url,
const String& message) {
EXPECT_TRUE(base::EndsWith(app_url.To<base::StringPiece>(),
« no previous file with comments | « shell/android/nfc_apptest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698