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

Side by Side Diff: services/js/echo_apptest.cc

Issue 1118843003: Remove some InterfacePtr<> methods which directly deal with message pipe handles. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "services/js/test/echo_service.mojom.h" 5 #include "services/js/test/echo_service.mojom.h"
6 #include "services/js/test/js_application_test_base.h" 6 #include "services/js/test/js_application_test_base.h"
7 7
8 using mojo::String; 8 using mojo::String;
9 9
10 namespace js { 10 namespace js {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 EXPECT_TRUE(echo_service_.WaitForIncomingMethodCall()); 101 EXPECT_TRUE(echo_service_.WaitForIncomingMethodCall());
102 EXPECT_TRUE(returned_value); 102 EXPECT_TRUE(returned_value);
103 echo_service_->Quit(); 103 echo_service_->Quit();
104 } 104 }
105 105
106 // Verify that connecting via the echo service application's ServiceProvider 106 // Verify that connecting via the echo service application's ServiceProvider
107 // behaves the same as connecting to the echo service directly. 107 // behaves the same as connecting to the echo service directly.
108 TEST_F(JSServiceProviderEchoTest, UseApplicationServiceProvider) { 108 TEST_F(JSServiceProviderEchoTest, UseApplicationServiceProvider) {
109 mojo::EchoServicePtr echo_service; 109 mojo::EchoServicePtr echo_service;
110 mojo::MessagePipe pipe; 110 mojo::MessagePipe pipe;
111 echo_service.Bind(pipe.handle0.Pass()); 111 echo_service.Bind(
112 mojo::InterfacePtrInfo<mojo::EchoService>(pipe.handle0.Pass(), 0u));
112 echo_service_provider_->ConnectToService( 113 echo_service_provider_->ConnectToService(
113 mojo::EchoService::Name_, pipe.handle1.Pass()); 114 mojo::EchoService::Name_, pipe.handle1.Pass());
114 String foo; 115 String foo;
115 EchoStringCallback callback(&foo); 116 EchoStringCallback callback(&foo);
116 echo_service->EchoString("foo", callback); 117 echo_service->EchoString("foo", callback);
117 EXPECT_TRUE(echo_service.WaitForIncomingMethodCall()); 118 EXPECT_TRUE(echo_service.WaitForIncomingMethodCall());
118 EXPECT_EQ("foo", foo); 119 EXPECT_EQ("foo", foo);
119 echo_service->Quit(); 120 echo_service->Quit();
120 } 121 }
121 122
122 } // namespace 123 } // namespace
123 } // namespace js 124 } // namespace js
OLDNEW
« no previous file with comments | « services/dart/content_handler_app_service_connector.cc ('k') | services/surfaces/display_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698