Automatic update from web-platform-tests Add tests of duplicate PublicKeyCredentialHint values This relates to WebAuthn PR #2145: https://github.com/w3c/webauthn/pull/2145 And in turn WebAuthn issue #2134: "Clarify behaviour of duplicate hints" https://github.com/w3c/webauthn/issues/2135 -- Restore parseCreationOptionsFromJSON() test with default hints -- Delete incorrect comment -- wpt-commits: 4fbb52f702779514c0eda03ebe91d7b0b365237c, 7e268b69d79672765b8893be228e2e267c02daeb, 934edca6015a1974c1e2314fe5aae3d56bd51be3 wpt-pr: 48096
39 lines
1.0 KiB
HTML
39 lines
1.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>WebAuthn createWithHints</title>
|
|
<meta name="timeout" content="long">
|
|
<link rel="help" href="https://w3c.github.io/webauthn/#sctn-public-key-easy">
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
<script src="/resources/testdriver.js"></script>
|
|
<script src="/resources/testdriver-vendor.js"></script>
|
|
<script src="helpers.js"></script>
|
|
<script src="resources/utils.js"></script>
|
|
<script>
|
|
function testCreateWithHints() {
|
|
"use strict";
|
|
|
|
// The 'hints' parameter affects UI, which cannot be tested with WPTs.
|
|
// However, we can check that unknown values are ignored, as they
|
|
// should be, and don't trigger an error.
|
|
standardSetup(function() {
|
|
promise_test(async t => {
|
|
return createCredential({
|
|
options: {
|
|
publicKey: {
|
|
hints: ["duplicated-value", "not-a-defined-value", "duplicated-value"],
|
|
},
|
|
},
|
|
});
|
|
});
|
|
});
|
|
}
|
|
|
|
testCreateWithHints();
|
|
</script>
|
|
</head>
|
|
<body></body>
|
|
</html>
|