Index: third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js |
diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js |
index 15d99fc3082bea5299136f395286ce6f890854f0..373b7368e2443c474f2c9a2740de56496e083a92 100644 |
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js |
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js |
@@ -17,8 +17,8 @@ let mockTextDetectionReady = define( |
handle => this.bindingSet_.addBinding(this, handle)); |
} |
- detect(frame_data, width, height) { |
- let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0); |
+ detect(image) { |
+ let receivedStruct = new Uint8Array(image.pixel_data); |
this.buffer_data_ = new Uint32Array(receivedStruct.buffer); |
return Promise.resolve({ |
results: [ |
@@ -32,7 +32,6 @@ let mockTextDetectionReady = define( |
}, |
], |
}); |
- mojo.unmapBuffer(receivedStruct.buffer); |
} |
getFrameData() { |