Update web-platform-tests to revision 9ca57e052ba1b19fa3dd46c6aa656e8d529469a8

This commit is contained in:
WPT Sync Bot 2020-09-12 08:20:19 +00:00
parent 68cb8f3d59
commit 75d6484415
1377 changed files with 31062 additions and 16983 deletions

View file

@ -94,10 +94,10 @@ function compareNDEFRecords(providedRecord, receivedRecord) {
// Compares NDEFWriteOptions structures that were provided to API and
// received by the mock mojo service.
function assertNDEFWriteOptionsEqual(provided, received) {
if (provided.ignoreRead !== undefined)
assert_equals(provided.ignoreRead, !!received.ignoreRead);
if (provided.overwrite !== undefined)
assert_equals(provided.overwrite, !!received.overwrite);
else
assert_equals(!!received.ignore_read, true);
assert_equals(!!received.overwrite, true);
}
// Compares NDEFReaderOptions structures that were provided to API and
@ -319,8 +319,9 @@ var WebNFCTest = (() => {
this.reading_messages_.push(message);
// Ignores reading if NFC operation is suspended.
if(this.operations_suspended_) return;
// Ignores reading if NDEFWriteOptions.ignoreRead is true.
if (this.pending_write_options_ && this.pending_write_options_.ignoreRead)
// when overwrite is false, the write algorithm will read the NFC tag
// to determine if it has NDEF records on it.
if (this.pending_write_options_ && this.pending_write_options_.overwrite)
return;
// Triggers onWatch if the new message matches existing watchers.
for (let watcher of this.watchers_) {