Update web-platform-tests to revision 74efe51f1faaa2bf3ff91c10f05a4ad9615a1553

This commit is contained in:
WPT Sync Bot 2019-12-31 08:22:52 +00:00
parent 267ce462d8
commit dacb7e9002
49 changed files with 2889 additions and 59 deletions

View file

@ -24,6 +24,14 @@ function toMojoNDEFMessage(message) {
function toMojoNDEFRecord(record) {
let nfcRecord = new device.mojom.NDEFRecord();
if (record.recordType.search(':') != -1) {
// Simply checks the existence of ':' to decide whether it's an external
// type. As a mock, no need to really implement the validation algo at
// https://w3c.github.io/web-nfc/#dfn-validate-external-type.
nfcRecord.category = device.mojom.NDEFRecordTypeCategory.kExternal;
} else {
nfcRecord.category = device.mojom.NDEFRecordTypeCategory.kStandardized;
}
nfcRecord.recordType = record.recordType;
nfcRecord.mediaType = record.mediaType;
nfcRecord.id = record.id;