Update web-platform-tests to revision 1a7f5f868420607ef13a00c6ec14fd9e0310e7c0

This commit is contained in:
WPT Sync Bot 2020-02-27 08:20:16 +00:00
parent 412eccddcc
commit 8fcaceef00
87 changed files with 2034 additions and 172 deletions

View file

@ -144,8 +144,13 @@ var WebNFCTest = (() => {
this.bindingSet_ = new mojo.BindingSet(device.mojom.NFC);
this.interceptor_ = new MojoInterfaceInterceptor(device.mojom.NFC.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.hw_status_ = NFCHWStatus.ENABLED;
@ -159,6 +164,7 @@ var WebNFCTest = (() => {
this.operations_suspended_ = false;
this.is_formatted_tag_ = false;
this.data_transfer_failed_ = false;
this.should_close_pipe_on_request_ = false;
}
// NFC delegate functions.
@ -278,6 +284,7 @@ var WebNFCTest = (() => {
this.cancelPendingPushOperation();
this.is_formatted_tag_ = false;
this.data_transfer_failed_ = false;
this.should_close_pipe_on_request_ = false;
}
cancelPendingPushOperation() {
@ -360,6 +367,10 @@ var WebNFCTest = (() => {
simulateDataTransferFails() {
this.data_transfer_failed_ = true;
}
simulateClosedPipe() {
this.should_close_pipe_on_request_ = true;
}
}
let testInternal = {