| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Mock implementation of mojo PresentationService. | 2 * Mock implementation of mojo PresentationService. |
| 3 */ | 3 */ |
| 4 | 4 |
| 5 "use strict"; | 5 "use strict"; |
| 6 | 6 |
| 7 let presentationServiceMock = loadMojoModules( | 7 let presentationServiceMock = loadMojoModules( |
| 8 'presentationServiceMock', | 8 'presentationServiceMock', |
| 9 [ | 9 [ |
| 10 'third_party/WebKit/public/platform/modules/presentation/presentation.mojo
m', | 10 'content/common/presentation/presentation.mojom', |
| 11 'mojo/public/js/bindings', | 11 'mojo/public/js/bindings', |
| 12 ]).then(mojo => { | 12 ]).then(mojo => { |
| 13 let [ presentationService, bindings ] = mojo.modules; | 13 let [ presentationService, bindings ] = mojo.modules; |
| 14 | 14 |
| 15 class PresentationServiceMock { | 15 class PresentationServiceMock { |
| 16 constructor(interfaceProvider) { | 16 constructor(interfaceProvider) { |
| 17 interfaceProvider.addInterfaceOverrideForTesting( | 17 interfaceProvider.addInterfaceOverrideForTesting( |
| 18 presentationService.PresentationService.name, | 18 presentationService.PresentationService.name, |
| 19 handle => this.bindingSet_.addBinding(this, handle)); | 19 handle => this.bindingSet_.addBinding(this, handle)); |
| 20 this.interfaceProvider_ = interfaceProvider; | 20 this.interfaceProvider_ = interfaceProvider; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 33 joinSession(urls) { | 33 joinSession(urls) { |
| 34 return Promise.resolve({ | 34 return Promise.resolve({ |
| 35 sessionInfo: { url: urls[0], id: 'fakeSessionId' }, | 35 sessionInfo: { url: urls[0], id: 'fakeSessionId' }, |
| 36 error: null, | 36 error: null, |
| 37 }); | 37 }); |
| 38 } | 38 } |
| 39 } | 39 } |
| 40 | 40 |
| 41 return new PresentationServiceMock(mojo.frameInterfaces); | 41 return new PresentationServiceMock(mojo.frameInterfaces); |
| 42 }); | 42 }); |
| OLD | NEW |