Closed Bug 1608041 Opened 4 years ago Closed 4 years ago

[wpt-sync] Sync PR 21106 - [webnfc] NDEFRecordInit#encoding is only applicable for BufferSource data source

Categories

(Core :: DOM: Device Interfaces, task, P4)

task

Tracking

()

RESOLVED FIXED
mozilla74
Tracking Status
firefox74 --- fixed

People

(Reporter: mozilla.org, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 21106 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/21106
Details from upstream follow.

Leon Han <leon.han@intel.com> wrote:

[webnfc] NDEFRecordInit#encoding is only applicable for BufferSource data source

DOMString data source is always encoded as utf-8.

The spec change:
https://github.com/w3c/web-nfc/pull/522

BUG=520391

Change-Id: Iec3d923d169f7a61937eda5249a57c6803598678

Reviewed-on: https://chromium-review.googlesource.com/1991972
WPT-Export-Revision: dc0db5aa0e8a11b311ece73458b84f82ca0a3d49

Component: web-platform-tests → DOM: Device Interfaces
Product: Testing → Core
PR 21106 applied with additional changes from upstream: 296eabe620f27beda726c579481b436364971617, 3c2377fc1d3a0fc5da425dc5e63bbedab8cd3d9e, 48483e8e5afed7db92b43a05c4e7963b613f6ba9

CI Results

Ran 13 Firefox configurations based on mozilla-central, and Firefox, Chrome, and Safari on GitHub CI

Total 48 tests

Status Summary

Firefox

OK : 7
PASS: 41
FAIL: 95

Chrome

OK : 7
PASS: 31
FAIL: 64

Safari

OK : 7
FAIL: 95

Links

Gecko CI (Treeherder)
GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/web-nfc/NDEFReader_scan.https.html
Test that NDEFReader.onerror should be fired if the NFC tag does not expose NDEF technology.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading message with multiple records should succeed.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that nfc watch success if NFC HW is enabled.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader.scan rejects if signal is not an AbortSignal.: FAIL (Chrome: PASS, Safari: FAIL)
Test that NDEFReader.scan matches any ids if NDEFScanOptions.id is undefined.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader can not get any reading events once the signal aborts.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that an error event happens if no implementation for NFC Mojo interface is available.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader.scan rejects if NDEFScanOptions.signal is already aborted.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader.scan rejects if NDEFScanOptions.signal aborts right after the scan invocation.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFRecord.toRecords returns its embedded records correctly.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFReader.scan should fail if NFC HW is disabled.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFReader.scan should fail if user permission is not granted.: FAIL (Chrome: PASS, Safari: FAIL)
Test that NDEFReader.onreading should be fired on an unformatted NFC tag with empty records array for NDEFMessage.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFReader.scan should fail if NFC HW is not supported.: FAIL (Chrome: FAIL, Safari: FAIL)
/web-nfc/NDEFRecord_constructor.https.html
NDEFRecord constructor without NDEFRecordInit#recordType field: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with absolute-url record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with text record type and arrayBuffer data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with empty record type and id: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with invalid external record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor should only accept mediaType for mime record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with external record type: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFRecord constructor with custom record ids: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with url record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor without init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with record type string being treated as case sensitive: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with mime record type and json data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with empty record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with mime record type and stream data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with text record type and custom document language: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with unknown record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with text record type and string data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with text record type, encoding, and lang: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFRecord constructor with text record type and arrayBufferView data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with null init dict: FAIL (Chrome: PASS, Safari: FAIL)
/web-nfc/NDEFWriter_write.https.html
NDEFWriter.write with 'empty' record should succeed.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write NDEFMessage containing embedded records.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail if user permission is not granted.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail with NetworkError when NFC data transfer fails.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that promise is rejected with TypeError if NDEFMessageSource is invalid.: FAIL (Chrome: FAIL, Safari: FAIL)
Check that provided NDEFWriteOptions values are correctly converted.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should succeed to write data to an unformatted NFC device when the NDEFWriteOptions.overwrite is false.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should ignore reading data when ignoreRead is true.: FAIL (Chrome: FAIL, Safari: FAIL)
Synchronously signaled abort.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail if no implementation for NFC Mojo interface is available.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that mediaType should be set to 'application/octet-stream' if NDEFRecordInit.record's recordType is 'mime' and NDEFRecordInit.record's mediaType is undefined.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFWriter.write succeeds when message is ArrayBufferView.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFWriter.write succeeds when message is ArrayBuffer.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that promise is rejected with SyntaxError if NDEFMessageSource contains invalid records.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that WebNFC API is not accessible from iframe context.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail if abort write request before write happends.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail when the NFC device coming up does not expose NDEF technology.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail if signal is not an AbortSignal.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should succeed to overwrite the existing data when the NDEFWriteOptions.overwrite is true.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFWriter.write succeeds when message is DOMString.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should read data when ignoreRead is false.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write NDEFMessage containing text, mime, unknown, url, absolute-url and external records with default NDEFWriteOptions.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail when NFC HW is disabled.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail when there are NDEF records on the NFC device and NDEFWriteOptions.overwrite is false.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail if signal's aborted flag is set.: FAIL (Chrome: FAIL, Safari: FAIL)
Reject promise with NotSupportedError if NFC message size exceeds 32KB.: FAIL (Chrome: FAIL, Safari: FAIL)
Check that default NDEFWriteOptions values are correctly set.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should replace all previously configured write operations.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail when NFC HW is not supported.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should succeed when NFC HW is enabled: FAIL (Chrome: FAIL, Safari: FAIL)
/web-nfc/NDEFReadingEvent_constructor.https.html
NDEFReadingEvent constructor without init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor with serialNumber not present: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor with null serialNumber: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor with valid parameters: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor does not set NDEFRecord#lang for any text records it embeds: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor failed to construct its NDEFMessage: FAIL (Chrome: PASS, Safari: FAIL)
/web-nfc/NDEFReader_scan_iframe.https.html
Test that NDEFWriter.scan is not suspended if iframe gains focus.: FAIL (Chrome: FAIL, Safari: FAIL)
/web-nfc/NDEFReader_scan_filter.https.html
Test that reading data succeed when NDEFScanOptions' recordType is set to 'unknown'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'mime' record from different messages correctly with NDEFScanOptions' mediaType set.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'text'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'empty' record from different messages correctly with NDEFScanOptions' recordType is set to 'empty'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'text' record from different messages correctly with NDEFScanOptions' id set.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering external record from different messages correctly with NDEFScanOptions' recordType is set to the custom type.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'absolute-url' record from different messages correctly with NDEFScanOptions' recordType is set to 'absolute-url'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'absolute-url'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that the id of NDEFScanOptions filters relevant data sources correctly.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'mime'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'url' record from different messages correctly with NDEFScanOptions' recordType is set to 'url'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that the mediaType of NDEFScanOptions filters relevant data sources correctly.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'url'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to a custom type for external type records.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'empty'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'text' record from different messages correctly with NDEFScanOptions' recordType is set to 'text'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'mime' record from different messages correctly with NDEFScanOptions' recordType is set to 'mime'.: FAIL (Chrome: FAIL, Safari: FAIL)
Multiple scan() from the same NDEFReader object with new options should replace existing filters.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'unknown' record from different messages correctly with NDEFScanOptions' recordType is set to 'unknown'.: FAIL (Chrome: FAIL, Safari: FAIL)
/web-nfc/NDEFMessage_constructor.https.html
NDEFMessage constructor with a text record: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor with NDEFMessageInit#records being empty: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor without NDEFMessageInit#records field: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor with null init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor without init dict: FAIL (Chrome: PASS, Safari: FAIL)

Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/439df74af7e3
[wpt PR 21106] - [webnfc] NDEFRecordInit#encoding is only applicable for BufferSource data source, a=testonly
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla74
You need to log in before you can comment on or make changes to this bug.