Source code
Revision control
Copy as Markdown
Other Tools
Test Info: Warnings
- This test has a WPT meta file that expects 1 subtest issues.
- This WPT test may be referenced by the following Test IDs:
- /credential-management/otpcredential-store.https.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Tests OTPCredential handing of store()</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script type="module">
import {Status, expectOTPRequest} from "./support/otpcredential-helper.js";
promise_test(async t => {
await expectOTPRequest().andReturn(
() => ({status: Status.SUCCESS, otp: "ABC"}));
const cred = await navigator.credentials.get({otp: {transport: ["sms"]}});
return promise_rejects_dom(t, "NotSupportedError", navigator.credentials.store(cred));
}, "navigator.credentials.store() with an otp credential returns NotSupportedError");
</script>