| Index: third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
|
| diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
|
| index 6ba5fe87f66fbf4282b9a4c4435480fe0cd958d5..e77feec1bf19694137982b069b8f5baa6b89b31a 100644
|
| --- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
|
| +++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
|
| @@ -22,7 +22,7 @@ let mockShapeDetectionReady = define(
|
| bindings.StubBindings(this.stub_).delegate = this;
|
| }
|
|
|
| - detectFace(frame_data, width, height) {
|
| + detectFaces(frame_data, width, height) {
|
| let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
|
| this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
|
| return Promise.resolve({
|
| @@ -37,6 +37,24 @@ let mockShapeDetectionReady = define(
|
| mojo.unmapBuffer(receivedStruct.buffer);
|
| }
|
|
|
| + detectBarcodes(frame_data, width, height) {
|
| + let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
|
| + this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
|
| + return Promise.resolve({
|
| + results: [
|
| + {
|
| + raw_value : "cats",
|
| + bounding_box: { x : 1.0, y: 1.0, width: 100.0, height: 100.0 },
|
| + },
|
| + {
|
| + raw_value : "dogs",
|
| + bounding_box: { x : 2.0, y: 2.0, width: 50.0, height: 50.0 },
|
| + },
|
| + ],
|
| + });
|
| + mojo.unmapBuffer(receivedStruct.buffer);
|
| + }
|
| +
|
| getFrameData() {
|
| return this.buffer_data_;
|
| }
|
|
|