Open Bug 1662713 Opened 5 years ago Updated 5 years ago

[wpt-sync] Sync PR 25359 - WPT: Refactor web-nfc tests to use test-only-api.js

Categories

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

task

Tracking

()

People

(Reporter: wpt-sync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

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

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

b'Arnaud Mandy <arnaud.mandy@intel.com>' wrote:

WPT: Refactor web-nfc tests to use test-only-api.js

use of test-only-api.js in preparation for launching official MojoJS support
in WPT. This would not change the test results on Chromium waterfall
(everything should continue to pass) or upstream WPT (tests currently
fail because MojoJS isn't enabled).

Bug: 1123988
Change-Id: I638c27ffe363a7011fba40e1a78339d8052ef18a

Reviewed-on: https://chromium-review.googlesource.com/2390203
WPT-Export-Revision: 7f299648c45aa7501f7e7562aa0cf6164bb12a6a

Component: web-platform-tests → DOM: Device Interfaces
Product: Testing → Core

CI Results

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

Total 7 tests and 30 subtests

Status Summary

Firefox

OK : 4
FAIL : 102
ERROR: 3

Chrome

OK : 4
PASS : 36
FAIL : 66
ERROR: 3

Safari

OK : 4
FAIL : 102
ERROR: 3

Links

GitHub PR Head
GitHub PR Base

Details

New Tests That Don't Pass

/web-nfc/NDEFMessage_constructor.https.html
NDEFMessage constructor without init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor with null init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor without NDEFMessageInit#records field: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor with NDEFMessageInit#records being empty: FAIL (Chrome: PASS, Safari: FAIL)
NDEFMessage constructor with a text record: FAIL (Chrome: PASS, Safari: FAIL)
/web-nfc/NDEFReader_scan.https.html: ERROR (Chrome: ERROR, Safari: ERROR)
Test that NDEFReader.scan rejects if signal is not an AbortSignal.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFReader.scan should fail if user permission is not granted.: 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)
NDEFReader.scan should fail if NFC HW is disabled.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFReader.scan should fail if NFC HW is not supported.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that nfc watch success if NFC HW is enabled.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader.scan matches any ids if NDEFScanOptions.id is undefined.: 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)
Test that NDEFReader can not get any reading events once the signal aborts.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFRecord.toRecords returns its embedded records correctly.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFReader.scan returns smart-poster record correctly.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader.onerror should be fired if the NFC tag does not expose NDEF technology.: FAIL (Chrome: FAIL, 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)
Test that reading message with multiple records should succeed.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader.scan rejects if there is already an ongoing scan.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFReader.scan can be started after the previous scan is aborted.: FAIL (Chrome: FAIL, Safari: FAIL)
/web-nfc/NDEFReader_scan_filter.https.html: ERROR (Chrome: ERROR, Safari: ERROR)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'empty'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'mime'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'unknown'.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that reading data succeed when NDEFScanOptions' recordType is set to 'text'.: 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 'absolute-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 the id of NDEFScanOptions filters relevant data sources correctly.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that the mediaType of NDEFScanOptions filters relevant data sources correctly.: 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 'mime' record from different messages correctly with NDEFScanOptions' recordType is set to 'mime'.: 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)
Test that filtering 'text' record from different messages correctly with NDEFScanOptions' recordType is set to 'text'.: 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 filtering 'absolute-url' record from different messages correctly with NDEFScanOptions' recordType is set to 'absolute-url'.: 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 'text' record from different messages correctly with NDEFScanOptions' id set.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that filtering 'mime' record from different messages correctly with NDEFScanOptions' mediaType set.: FAIL (Chrome: FAIL, 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/NDEFReadingEvent_constructor.https.html
NDEFReadingEvent constructor without init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor failed to construct its NDEFMessage: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor with null serialNumber: FAIL (Chrome: PASS, Safari: FAIL)
NDEFReadingEvent constructor with serialNumber not present: 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)
/web-nfc/NDEFRecord_constructor.https.html
NDEFRecord constructor without init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with null init dict: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor without NDEFRecordInit#recordType field: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with empty record type and id: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor should only accept mediaType for mime record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with custom record ids: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with empty 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 and arrayBuffer data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with text record type and arrayBufferView data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with text record type, encoding, and lang: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with text record type and custom document language: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with url record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with absolute-url record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with mime record type and stream data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with mime record type and json data: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with unknown record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with external record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with local record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with smart-poster record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with smart-poster record type that contains only a mandatory uri record: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with record type string being treated as case sensitive: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with invalid external record type: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor for smart-poster record with invalid embedded records.: FAIL (Chrome: PASS, Safari: FAIL)
NDEFRecord constructor with various local record types: FAIL (Chrome: PASS, Safari: FAIL)
/web-nfc/NDEFWriter_write.https.html: ERROR (Chrome: ERROR, Safari: ERROR)
Test that promise is rejected with TypeError if NDEFMessageSource is invalid.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that promise is rejected with SyntaxError if NDEFMessageSource contains invalid 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 if no implementation for NFC Mojo interface is available.: 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 if signal's aborted flag is set.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail if signal is not an AbortSignal.: FAIL (Chrome: FAIL, Safari: FAIL)
Synchronously signaled abort.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail when NFC HW is disabled.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should fail when NFC HW is not supported.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that WebNFC API is not accessible from iframe context.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should succeed when NFC HW is enabled: 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 NDEFMessage containing embedded records.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write NDEFMessage containing smart-poster record.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFWriter.write succeeds when message is DOMString.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFWriter.write succeeds when message is ArrayBuffer.: FAIL (Chrome: FAIL, Safari: FAIL)
Test that NDEFWriter.write succeeds when message is ArrayBufferView.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write with 'empty' record should succeed.: FAIL (Chrome: FAIL, Safari: FAIL)
Check that default NDEFWriteOptions values are correctly set.: FAIL (Chrome: FAIL, Safari: FAIL)
Check that provided NDEFWriteOptions values are correctly converted.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should read data when ignoreRead is false.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should ignore reading data when ignoreRead is true.: FAIL (Chrome: FAIL, Safari: FAIL)
NDEFWriter.write should replace all previously configured write operations.: 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)
NDEFWriter.write should fail when the NFC device coming up does not expose NDEF technology.: 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 succeed to overwrite the existing data when the NDEFWriteOptions.overwrite is true.: 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 with NetworkError when NFC data transfer fails.: FAIL (Chrome: FAIL, Safari: FAIL)

You need to log in before you can comment on or make changes to this bug.