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

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

Issue 2405093003: [WIP] Mojo native bindings interface.
Patch Set: fixes webui tests Created 3 years, 10 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..57af63d3f7395c33d35b89507b24914c8bc39df7 100644
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js
@@ -5,9 +5,8 @@ let mockFaceDetectionProviderReady = define(
['services/shape_detection/public/interfaces/facedetection.mojom',
'services/shape_detection/public/interfaces/facedetection_provider.mojom',
'mojo/public/js/bindings',
- 'mojo/public/js/core',
'content/public/renderer/interfaces',
- ], (faceDetection, faceDetectionProvider, bindings, mojo, interfaces) => {
+ ], (faceDetection, faceDetectionProvider, bindings, interfaces) => {
class MockFaceDetectionProvider {
constructor() {
@@ -45,7 +44,7 @@ let mockFaceDetectionProviderReady = define(
}
detect(frame_data, width, height) {
- let receivedStruct = mojo.mapBuffer(frame_data, 0, width*height*4, 0);
+ let receivedStruct = frame_data.mapBuffer(0, width*height*4);
this.buffer_data_ = new Uint32Array(receivedStruct.buffer);
return Promise.resolve({
result: {
@@ -56,7 +55,6 @@ let mockFaceDetectionProviderReady = define(
]
}
});
- mojo.unmapBuffer(receivedStruct.buffer);
}
}
return new MockFaceDetectionProvider();

Powered by Google App Engine
This is Rietveld 408576698