Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Unified Diff: third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js

Issue 2859413002: Shape Detection: add idl and mojom for face landmarks and wire for Mac (Closed)
Patch Set: service-worker's global-interface-listing-expected.txt updated Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..f7dd350e4147c0ab30d0e1a58caff7a6a8dc1e80 100644
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
@@ -48,13 +48,23 @@ let mockFaceDetectionProviderReady = define(
let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
return Promise.resolve({
- result: {
- 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 },
- ]
- }
+ results: [
+ {
+ bounding_box: {x: 1.0, y: 1.0, width: 100.0, height: 100.0},
+ landmarks: [{
+ type: faceDetection.LandmarkType.EYE,
+ location: {x: 4.0, y: 5.0}
+ }]
+ },
+ {
+ bounding_box: {x: 2.0, y: 2.0, width: 200.0, height: 200.0},
+ landmarks: []
+ },
+ {
+ bounding_box: {x: 3.0, y: 3.0, width: 300.0, height: 300.0},
+ landmarks: []
+ },
+ ]
});
mojo.unmapBuffer(receivedStruct.buffer);
}

Powered by Google App Engine
This is Rietveld 408576698