Update web-platform-tests to revision 5d33b4da92080b7658168bdb0fbdc3531bda1ddf

This commit is contained in:
WPT Sync Bot 2020-03-10 08:19:03 +00:00
parent 7010178691
commit 5b46b73c1b
139 changed files with 2001 additions and 261 deletions

View file

@ -25,7 +25,7 @@ function waitSyntaxErrorPromise(t, scan_options) {
return promise_rejects_dom(t, 'SyntaxError', reader.scan(scan_options));
}
promise_test(async t => {
nfc_test(async t => {
const reader = new NDEFReader();
const promises = [];
invalid_signals.forEach(invalid_signal => {
@ -35,12 +35,8 @@ promise_test(async t => {
await Promise.all(promises);
}, "Test that NDEFReader.scan rejects if signal is not an AbortSignal.");
promise_test(async t => {
if (window.testRunner) {
// Deny nfc permissions for Chromium testrunner.
window.testRunner.setPermission('nfc', 'denied',
location.origin, location.origin);
}
nfc_test(async t => {
await test_driver.set_permission({ name: 'nfc' }, 'denied', false);
const reader = new NDEFReader();
await promise_rejects_dom(t, 'NotAllowedError', reader.scan());
}, "NDEFReader.scan should fail if user permission is not granted.");
@ -49,10 +45,6 @@ promise_test(async t => {
// implementation for NFC Mojo interface.
nfc_test(async (t, mockNFC) => {
mockNFC.simulateClosedPipe();
if (window.testRunner) {
window.testRunner.setPermission('nfc', 'granted',
location.origin, location.origin);
}
const reader = new NDEFReader();
const readerWatcher = new EventWatcher(t, reader, ["reading", "error"]);
const promise = readerWatcher.wait_for("error").then(event => {