mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Update web-platform-tests to revision 4100d1d51b885185c50902397f7d203d89efc24c
This commit is contained in:
parent
fd174c54ef
commit
35b828da75
91 changed files with 1843 additions and 298 deletions
|
@ -3,9 +3,32 @@
|
|||
<link rel="help" href="https://w3c.github.io/web-nfc/#dom-nfcreadingevent">
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script src="resources/nfc_help.js"></script>
|
||||
<script>
|
||||
|
||||
const non_strings = [
|
||||
123,
|
||||
{},
|
||||
true,
|
||||
Symbol(),
|
||||
() => {},
|
||||
self
|
||||
]
|
||||
|
||||
test(() => {
|
||||
assert_equals(NFCReadingEvent.length, 2);
|
||||
assert_throws(new TypeError, () => new NFCReadingEvent('message'));
|
||||
}, 'NFCReadingEvent constructor without init dict');
|
||||
|
||||
test(() => {
|
||||
assert_equals(NFCReadingEvent.length, 2);
|
||||
const message = createMessage([createJsonRecord(test_json_data)]);
|
||||
non_strings.forEach(invalid_serialNumber => {
|
||||
assert_throws(new TypeError, () => new NFCReadingEvent(
|
||||
'message',
|
||||
{invalid_serialNumber, message}
|
||||
));
|
||||
});
|
||||
}, 'NFCReadingEvent constructor with non-string serialNumber');
|
||||
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue