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

Side by Side Diff: mojo/go/tests/application_impl_test.go

Issue 2034383003: Removed exposed_services from mojom definitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 4 years, 6 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
« no previous file with comments | « mojo/dart/packages/mojo/lib/src/application.dart ('k') | mojo/gpu/gl_context.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 package tests 5 package tests
6 6
7 import ( 7 import (
8 "fmt" 8 "fmt"
9 "sync" 9 "sync"
10 "testing" 10 "testing"
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 } 104 }
105 105
106 func (delegate *EchoDelegate) Quit() {} 106 func (delegate *EchoDelegate) Quit() {}
107 107
108 // shellImpl forward connection from local EchoDelegate instance to remote. 108 // shellImpl forward connection from local EchoDelegate instance to remote.
109 type shellImpl struct { 109 type shellImpl struct {
110 remoteApp *mojoApp.Application_Proxy 110 remoteApp *mojoApp.Application_Proxy
111 localURL string 111 localURL string
112 } 112 }
113 113
114 func (s *shellImpl) ConnectToApplication(URL string, services *sp.ServiceProvide r_Request, exposedServices *sp.ServiceProvider_Pointer) error { 114 func (s *shellImpl) ConnectToApplication(URL string, services sp.ServiceProvider _Request) error {
115 if URL != pairedURL(s.localURL) { 115 if URL != pairedURL(s.localURL) {
116 return fmt.Errorf("invalid URL: want %v, got %v", pairedURL(s.lo calURL), URL) 116 return fmt.Errorf("invalid URL: want %v, got %v", pairedURL(s.lo calURL), URL)
117 } 117 }
118 » s.remoteApp.AcceptConnection(s.localURL, services, exposedServices, pair edURL(s.localURL)) 118 » s.remoteApp.AcceptConnection(s.localURL, pairedURL(s.localURL), services )
119 return nil 119 return nil
120 } 120 }
121 121
122 func (s *shellImpl) CreateApplicationConnector(applicationConnectorRequest ac.Ap plicationConnector_Request) error { 122 func (s *shellImpl) CreateApplicationConnector(applicationConnectorRequest ac.Ap plicationConnector_Request) error {
123 // TODO(vtl): https://github.com/domokit/mojo/issues/533 123 // TODO(vtl): https://github.com/domokit/mojo/issues/533
124 panic("not implemented") 124 panic("not implemented")
125 } 125 }
126 126
127 func TestApplication(t *testing.T) { 127 func TestApplication(t *testing.T) {
128 var apps []*mojoApp.Application_Proxy 128 var apps []*mojoApp.Application_Proxy
(...skipping 25 matching lines...) Expand all
154 // Wait and then close pipes. 154 // Wait and then close pipes.
155 responsesSent.Wait() 155 responsesSent.Wait()
156 for i := 0; i < 2; i++ { 156 for i := 0; i < 2; i++ {
157 apps[i].RequestQuit() 157 apps[i].RequestQuit()
158 } 158 }
159 appsTerminated.Wait() 159 appsTerminated.Wait()
160 for i := 0; i < 2; i++ { 160 for i := 0; i < 2; i++ {
161 apps[i].Close_Proxy() 161 apps[i].Close_Proxy()
162 } 162 }
163 } 163 }
OLDNEW
« no previous file with comments | « mojo/dart/packages/mojo/lib/src/application.dart ('k') | mojo/gpu/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698