| Index: third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| index ed870babd3f34f07c3743cc48a72a75c2af133d2..8395550f40c19562c312e7f1b9839afffc3bf72f 100644
|
| --- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| +++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-barcodedetection.js
|
| @@ -4,22 +4,18 @@ let mockBarcodeDetectionReady = define(
|
| 'mockBarcodeDetection',
|
| ['third_party/WebKit/public/platform/modules/shapedetection/barcodedetection.mojom',
|
| 'mojo/public/js/bindings',
|
| - 'mojo/public/js/connection',
|
| 'mojo/public/js/core',
|
| 'content/public/renderer/frame_interfaces',
|
| - ], (barcodeDetection, bindings, connection, mojo, interfaces) => {
|
| + ], (barcodeDetection, bindings, mojo, interfaces) => {
|
|
|
| class MockBarcodeDetection {
|
| constructor() {
|
| + this.bindingSet_ = new bindings.BindingSet(
|
| + barcodeDetection.BarcodeDetection);
|
| +
|
| interfaces.addInterfaceOverrideForTesting(
|
| barcodeDetection.BarcodeDetection.name,
|
| - pipe => this.bindToPipe(pipe));
|
| - }
|
| -
|
| - bindToPipe(pipe) {
|
| - this.stub_ = connection.bindHandleToStub(pipe,
|
| - barcodeDetection.BarcodeDetection);
|
| - bindings.StubBindings(this.stub_).delegate = this;
|
| + handle => this.bindingSet_.addBinding(this, handle));
|
| }
|
|
|
| detect(frame_data, width, height) {
|
|
|