Index: third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js |
diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js |
index 1faf89f7727c4a8bcbeb293978e3c643e5d2693a..d1d1f590695d7b21f852bac13dfe8a6c7efc5f9a 100644 |
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js |
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js |
@@ -17,22 +17,25 @@ let mockFaceDetectionProviderReady = define( |
interfaces.addInterfaceOverrideForTesting( |
faceDetectionProvider.FaceDetectionProvider.name, |
handle => this.bindingSet_.addBinding(this, handle)); |
+ |
+ this.mockServiceInstances_ = []; |
} |
createFaceDetection(request, options) { |
- this.mock_service_ = new MockFaceDetection(request, options); |
+ this.mockServiceInstances_.push(new MockFaceDetection(request, options)); |
+ this.index = this.mockServiceInstances_.length -1; |
Ken Rockot(use gerrit already)
2017/05/17 15:29:23
You established in your previous reply that multip
|
} |
getFrameData() { |
- return this.mock_service_.buffer_data_; |
+ return this.mockServiceInstances_[this.index].bufferData_; |
} |
getMaxDetectedFaces() { |
- return this.mock_service_.maxDetectedFaces_; |
+ return this.mockServiceInstances_[this.index].maxDetectedFaces_; |
} |
getFastMode () { |
- return this.mock_service_.fastMode_; |
+ return this.mockServiceInstances_[this.index].fastMode_; |
} |
} |
@@ -46,7 +49,7 @@ let mockFaceDetectionProviderReady = define( |
detect(frame_data, width, height) { |
let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0); |
- this.buffer_data_ = new Uint32Array(receivedStruct.buffer); |
+ this.bufferData_ = new Uint32Array(receivedStruct.buffer); |
return Promise.resolve({ |
result: { |
bounding_boxes: [ |