diff options
Diffstat (limited to 'testing/web-platform/tests/credential-management/otpcredential-store.https.html')
-rw-r--r-- | testing/web-platform/tests/credential-management/otpcredential-store.https.html | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/testing/web-platform/tests/credential-management/otpcredential-store.https.html b/testing/web-platform/tests/credential-management/otpcredential-store.https.html new file mode 100644 index 0000000000..fa2ae8933d --- /dev/null +++ b/testing/web-platform/tests/credential-management/otpcredential-store.https.html @@ -0,0 +1,17 @@ +<!DOCTYPE html> +<link rel="help" href="https://github.com/WICG/WebOTP"> +<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> |