| 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 e77feec1bf19694137982b069b8f5baa6b89b31a..7c0049d57af514fcf63d4ae2693dfdf85c075833 100644
|
| --- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
|
| +++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-shapedetection.js
|
| @@ -22,12 +22,14 @@ let mockShapeDetectionReady = define(
|
| bindings.StubBindings(this.stub_).delegate = this;
|
| }
|
|
|
| - detectFaces(frame_data, width, height) {
|
| + detectFaces(frame_data, width, height, options) {
|
| let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
|
| this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
|
| + this.maxDetectedFaces_ = options.max_detected_faces;
|
| + this.fastMode_ = options.fast_mode;
|
| return Promise.resolve({
|
| result: {
|
| - boundingBoxes: [
|
| + bounding_boxes: [
|
| { x : 1.0, y: 1.0, width: 100.0, height: 100.0 },
|
| { x : 2.0, y: 2.0, width: 200.0, height: 200.0 },
|
| { x : 3.0, y: 3.0, width: 300.0, height: 300.0 },
|
| @@ -58,6 +60,14 @@ let mockShapeDetectionReady = define(
|
| getFrameData() {
|
| return this.buffer_data_;
|
| }
|
| +
|
| + getMaxDetectedFaces() {
|
| + return this.maxDetectedFaces_;
|
| + }
|
| +
|
| + getFastMode () {
|
| + return this.fastMode_;
|
| + }
|
| }
|
| return new MockShapeDetection();
|
| });
|
|
|