зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1909589 [wpt PR 47268] - Cred Man: add basic get tests, a=testonly
Automatic update from web-platform-tests Cred Man: add basic get tests (#47268) -- wpt-commits: 8f374a15c2181979c1e2290d4ae8436a33650929 wpt-pr: 47268
This commit is contained in:
Родитель
e565c4dcd8
Коммит
7eb81754c0
|
@ -0,0 +1,57 @@
|
|||
<!DOCTYPE html>
|
||||
<title>Credential Management API: create() basics.</title>
|
||||
<script src="/resources/testharness.js"></script>
|
||||
<script src="/resources/testharnessreport.js"></script>
|
||||
<script>
|
||||
promise_test(async (t) => {
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get()
|
||||
);
|
||||
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get({})
|
||||
);
|
||||
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get({ x: "y" })
|
||||
);
|
||||
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get({ x: "y", y: "z" })
|
||||
);
|
||||
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get({ x: "y" })
|
||||
);
|
||||
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get({ mediation: "required" })
|
||||
);
|
||||
|
||||
const abortController = new AbortController();
|
||||
const { signal } = abortController;
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get({ signal })
|
||||
);
|
||||
|
||||
await promise_rejects_dom(
|
||||
t,
|
||||
"NotSupportedError",
|
||||
navigator.credentials.get({ signal, mediation: "required" })
|
||||
);
|
||||
}, "Calling navigator.credentials.get() without a valid matching interface.");
|
||||
</script>
|
Загрузка…
Ссылка в новой задаче