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

Unified Diff: third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.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-textdetection.js
diff --git a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js
index 08195c993242b69e0061be7e34b6f1644f426c9d..333ea10abf6fb85800f7b674f7f777342b09dd42 100644
--- a/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js
+++ b/third_party/WebKit/LayoutTests/shapedetection/resources/mock-textdetection.js
@@ -4,9 +4,8 @@ let mockTextDetectionReady = define(
'mockTextDetection',
['services/shape_detection/public/interfaces/textdetection.mojom',
'mojo/public/js/bindings',
- 'mojo/public/js/core',
'content/public/renderer/interfaces',
- ], (textDetection, bindings, mojo, interfaces) => {
+ ], (textDetection, bindings, interfaces) => {
class MockTextDetection {
constructor() {
@@ -18,7 +17,7 @@ let mockTextDetectionReady = 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({
results: [
@@ -32,7 +31,6 @@ let mockTextDetectionReady = define(
},
],
});
- mojo.unmapBuffer(receivedStruct.buffer);
}
getFrameData() {
« no previous file with comments | « third_party/WebKit/LayoutTests/shapedetection/resources/mock-facedetection.js ('k') | third_party/WebKit/Source/web/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698