mirror of
https://github.com/servo/servo.git
synced 2025-08-30 17:48:20 +01:00
Update web-platform-tests to revision 70fdd27f4cecb8a5cae3dafa76ba05265531c9e2
This commit is contained in:
parent
e5689df6b4
commit
bea56037ef
701 changed files with 13864 additions and 1909 deletions
|
@ -28,6 +28,10 @@ function toMojoNDEFRecord(record) {
|
|||
nfcRecord.recordType = record.recordType;
|
||||
nfcRecord.mediaType = record.mediaType;
|
||||
nfcRecord.data = toByteArray(record.data);
|
||||
if (record.data != null && record.data.records !== undefined) {
|
||||
// |record.data| may be an NDEFMessageInit, i.e. the payload is a message.
|
||||
nfcRecord.payloadMessage = toMojoNDEFMessage(record.data);
|
||||
}
|
||||
return nfcRecord;
|
||||
}
|
||||
|
||||
|
@ -100,8 +104,7 @@ function assertNDEFReaderOptionsEqual(provided, received) {
|
|||
assert_equals(received.mediaType, '');
|
||||
|
||||
if (provided.recordType !== undefined) {
|
||||
assert_equals(!+received.record_filter, true);
|
||||
assert_equals(provided.recordType, received.recordFilter.recordType);
|
||||
assert_equals(provided.recordType, received.recordType);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -111,8 +114,8 @@ function matchesWatchOptions(message, options) {
|
|||
if (!matchesWebNfcId(message.url, options.url)) return false;
|
||||
|
||||
// Matches any record / media type.
|
||||
if ((options.mediaType == null || options.mediaType === "")
|
||||
&& options.recordFilter == null) {
|
||||
if ((options.mediaType == null || options.mediaType === '') &&
|
||||
options.recordType == null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -122,8 +125,8 @@ function matchesWatchOptions(message, options) {
|
|||
&& options.mediaType !== record.mediaType) {
|
||||
return false;
|
||||
}
|
||||
if (options.recordFilter != null &&
|
||||
options.recordFilter.recordType !== record.recordType) {
|
||||
if (options.recordType != null &&
|
||||
options.recordType !== record.recordType) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue