gecko-dev/testing/web-platform/tests/web-nfc/idlharness.https.window.js
kaixinjxq d4890aba5c Bug 1531258 [wpt PR 15557] - Update web-nfc idlharness.https.window.js, a=testonly
Automatic update from web-platform-tests
Update web-nfc idlharness.https.window.js (#15557)

--

wpt-commits: de20bc32bb747cbe1423dc963b9b44a22214de09
wpt-pr: 15557
2019-04-01 14:42:10 +01:00

26 lines
612 B
JavaScript

// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
'use strict';
// https://w3c.github.io/web-nfc/
const message = {
url: "/custom/path",
records: [{
recordType: "text",
data: "Hello World"
}]
}
idl_test(
['web-nfc'],
['html', 'dom'],
idl_array => {
idl_array.add_objects({
NFCWriter: ['new NFCWriter();'],
NFCReader: ['new NFCReader();'],
NFCReadingEvent: [`new NFCReadingEvent("reading", { message: ${JSON.stringify(message)} })`],
NFCErrorEvent: ['new NFCErrorEvent("error", { error: new DOMException() });'],
});
}
);