mirror of
https://github.com/servo/servo.git
synced 2025-08-11 00:15:32 +01:00
Update web-platform-tests to revision 30a08266e1951b16ab2587068de64041095bbc2f
This commit is contained in:
parent
7b5ec99d25
commit
19a2b8047d
185 changed files with 3858 additions and 329 deletions
|
@ -10,9 +10,14 @@ var BarcodeDetectionTest = (() => {
|
|||
|
||||
this.interceptor_ = new MojoInterfaceInterceptor(
|
||||
shapeDetection.mojom.BarcodeDetectionProvider.name);
|
||||
this.interceptor_.oninterfacerequest =
|
||||
e => this.bindingSet_.addBinding(this, e.handle);
|
||||
this.interceptor_.oninterfacerequest = e => {
|
||||
if (this.should_close_pipe_on_request_)
|
||||
e.handle.close();
|
||||
else
|
||||
this.bindingSet_.addBinding(this, e.handle);
|
||||
}
|
||||
this.interceptor_.start();
|
||||
this.should_close_pipe_on_request_ = false;
|
||||
}
|
||||
|
||||
createBarcodeDetection(request, options) {
|
||||
|
@ -39,9 +44,15 @@ var BarcodeDetectionTest = (() => {
|
|||
|
||||
reset() {
|
||||
this.mockService_ = null;
|
||||
this.should_close_pipe_on_request_ = false;
|
||||
this.bindingSet_.closeAllBindings();
|
||||
this.interceptor_.stop();
|
||||
}
|
||||
|
||||
// simulate a 'no implementation available' case
|
||||
simulateNoImplementation() {
|
||||
this.should_close_pipe_on_request_ = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Class that mocks BarcodeDetection interface defined in
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue