| OLD | NEW |
| 1 "use strict"; | 1 "use strict"; |
| 2 | 2 |
| 3 let mockTextDetectionReady = define( | 3 let mockTextDetectionReady = define( |
| 4 'mockTextDetection', | 4 'mockTextDetection', |
| 5 ['services/shape_detection/public/interfaces/textdetection.mojom', | 5 ['services/shape_detection/public/interfaces/textdetection.mojom', |
| 6 'mojo/public/js/bindings', | 6 'mojo/public/js/bindings', |
| 7 'mojo/public/js/core', | 7 'mojo/public/js/core', |
| 8 'content/public/renderer/frame_interfaces', | 8 'content/public/renderer/interfaces', |
| 9 ], (textDetection, bindings, mojo, interfaces) => { | 9 ], (textDetection, bindings, mojo, interfaces) => { |
| 10 | 10 |
| 11 class MockTextDetection { | 11 class MockTextDetection { |
| 12 constructor() { | 12 constructor() { |
| 13 this.bindingSet_ = new bindings.BindingSet(textDetection.TextDetection); | 13 this.bindingSet_ = new bindings.BindingSet(textDetection.TextDetection); |
| 14 | 14 |
| 15 interfaces.addInterfaceOverrideForTesting( | 15 interfaces.addInterfaceOverrideForTesting( |
| 16 textDetection.TextDetection.name, | 16 textDetection.TextDetection.name, |
| 17 handle => this.bindingSet_.addBinding(this, handle)); | 17 handle => this.bindingSet_.addBinding(this, handle)); |
| 18 } | 18 } |
| (...skipping 15 matching lines...) Expand all Loading... |
| 34 }); | 34 }); |
| 35 mojo.unmapBuffer(receivedStruct.buffer); | 35 mojo.unmapBuffer(receivedStruct.buffer); |
| 36 } | 36 } |
| 37 | 37 |
| 38 getFrameData() { | 38 getFrameData() { |
| 39 return this.buffer_data_; | 39 return this.buffer_data_; |
| 40 } | 40 } |
| 41 } | 41 } |
| 42 return new MockTextDetection(); | 42 return new MockTextDetection(); |
| 43 }); | 43 }); |
| OLD | NEW |