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

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

Issue 1660403003: Mojo C++ bindings: Rename InterfaceInfoPtr -> InterfaceHandle (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: using {{InterfaceName}}Handle = InterfaceHandle<{{InterfaceName}}> Created 4 years, 10 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 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
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( 111 echo_service.Bind(
112 mojo::InterfacePtrInfo<mojo::EchoService>(pipe.handle0.Pass(), 0u)); 112 mojo::InterfaceHandle<mojo::EchoService>(pipe.handle0.Pass(), 0u));
113 echo_service_provider_->ConnectToService( 113 echo_service_provider_->ConnectToService(
114 mojo::EchoService::Name_, pipe.handle1.Pass()); 114 mojo::EchoService::Name_, pipe.handle1.Pass());
115 String foo; 115 String foo;
116 EchoStringCallback callback(&foo); 116 EchoStringCallback callback(&foo);
117 echo_service->EchoString("foo", callback); 117 echo_service->EchoString("foo", callback);
118 EXPECT_TRUE(echo_service.WaitForIncomingResponse()); 118 EXPECT_TRUE(echo_service.WaitForIncomingResponse());
119 EXPECT_EQ("foo", foo); 119 EXPECT_EQ("foo", foo);
120 echo_service->Quit(); 120 echo_service->Quit();
121 } 121 }
122 122
123 } // namespace 123 } // namespace
124 } // namespace js 124 } // namespace js
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698