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 f7dd350e4147c0ab30d0e1a58caff7a6a8dc1e80..fda8417083519f184e960418385d2064896ad73e 100644 |
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js |
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js |
@@ -44,8 +44,8 @@ let mockFaceDetectionProviderReady = define( |
request); |
} |
- detect(frame_data, width, height) { |
- let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0); |
+ detect(bitmap_data) { |
+ let receivedStruct = new Uint8Array(bitmap_data.pixel_data); |
this.buffer_data_ = new Uint32Array(receivedStruct.buffer); |
return Promise.resolve({ |
results: [ |
@@ -66,7 +66,6 @@ let mockFaceDetectionProviderReady = define( |
}, |
] |
}); |
- mojo.unmapBuffer(receivedStruct.buffer); |
} |
} |
return new MockFaceDetectionProvider(); |