Update web-platform-tests to revision 289272c280086dda4bce0d31f2ce0fc1e7a08fa8

This commit is contained in:
WPT Sync Bot 2021-02-03 08:20:34 +00:00
parent 6f93950bf2
commit 78cf1982a2
230 changed files with 1832 additions and 1867 deletions

View file

@ -1,16 +1,15 @@
"use strict";
var TextDetectionTest = (() => {
import {TextDetection, TextDetectionReceiver} from '/gen/services/shape_detection/public/mojom/textdetection.mojom.m.js';
self.TextDetectionTest = (() => {
// Class that mocks TextDetection interface defined in
// https://cs.chromium.org/chromium/src/services/shape_detection/public/mojom/textdetection.mojom
class MockTextDetection {
constructor() {
this.bindingSet_ =
new mojo.BindingSet(shapeDetection.mojom.TextDetection);
this.receiver_ = new TextDetectionReceiver(this);
this.interceptor_ =
new MojoInterfaceInterceptor(shapeDetection.mojom.TextDetection.name);
new MojoInterfaceInterceptor(TextDetection.$interfaceName);
this.interceptor_.oninterfacerequest =
e => this.bindingSet_.addBinding(this, e.handle);
e => this.receiver_.$.bindHandle(e.handle);
this.interceptor_.start();
}
@ -48,7 +47,7 @@ var TextDetectionTest = (() => {
}
reset() {
this.bindingSet_.closeAllBindings();
this.receiver_.$.close();
this.interceptor_.stop();
}