Automatic update from web-platform-tests Digital Credentials: Add userAgentAllowsProtocol method (#53089) * Add test for clientAllowsProtocol static method on DigitalCredential * update spec links and add Tim * Update digital-credentials/digital-credential-client-allows-protocol.https.html * add additional test identifiers * change to match new name, update link, update title --------- Co-authored-by: Marcos Cáceres <marcos@marcosc.com> -- wpt-commits: 3fa46128a26cf01b7a0ac3b6818c4b05d283ace7 wpt-pr: 53089
20 lines
789 B
HTML
20 lines
789 B
HTML
<!DOCTYPE html>
|
|
<title>Tests for DigitalCredential's userAgentAllowsProtocol() static method.</title>
|
|
<link rel="help" href="https://github.com/w3c-fedid/digital-credentials/pull/221" />
|
|
<script src="/resources/testharness.js"></script>
|
|
<script src="/resources/testharnessreport.js"></script>
|
|
|
|
<body></body>
|
|
<script type="module">
|
|
|
|
const invalidIdentifiers = ["", " ", "a b", "a,b", "AB", "a.B", "a.b", " foo-bar", " foo-bar ", "foo-bar ", "fooBar"];
|
|
|
|
promise_test(async (t) => {
|
|
for (const invalidIdentifier of invalidIdentifiers) {
|
|
const result = DigitalCredential.userAgentAllowsProtocol(invalidIdentifier);
|
|
assert_equals(result, false, `Incorrect result for ${invalidIdentifier}.`);
|
|
}
|
|
}, "User agent does not allow invalid protocol identifiers.");
|
|
|
|
</script>
|