Update web-platform-tests to revision 3488a5a845bec08943f66974e9f0df4ffe96774a

This commit is contained in:
WPT Sync Bot 2020-01-06 08:22:49 +00:00
parent 0d142bea9a
commit cc9937a2b0
26 changed files with 302 additions and 147 deletions

View file

@ -170,6 +170,7 @@ var WebNFCTest = (() => {
this.reading_messages_ = [];
this.operations_suspended_ = false;
this.is_formatted_tag_ = false;
this.data_transfer_failed_ = false;
}
// NFC delegate functions.
@ -192,6 +193,9 @@ var WebNFCTest = (() => {
// Resolves with NotAllowedError if there are NDEF records on the device
// and overwrite is false.
resolve(createNDEFError(device.mojom.NDEFErrorType.NOT_ALLOWED));
} else if (this.data_transfer_failed_) {
// Resolves with NetworkError if data transfer fails.
resolve(createNDEFError(device.mojom.NDEFErrorType.IO_ERROR));
} else {
resolve(createNDEFError(null));
}
@ -290,6 +294,7 @@ var WebNFCTest = (() => {
this.operations_suspended_ = false;
this.cancelPendingPushOperation();
this.is_formatted_tag_ = false;
this.data_transfer_failed_ = false;
}
cancelPendingPushOperation() {
@ -365,6 +370,10 @@ var WebNFCTest = (() => {
setIsFormattedTag(isFormatted) {
this.is_formatted_tag_ = isFormatted;
}
simulateDataTransferFails() {
this.data_transfer_failed_ = true;
}
}
let testInternal = {