Skip to content

Commit 7bc216e

Browse files
npm1chromium-wpt-export-bot
authored andcommitted
[FedCM] Add a WPT for too many disconnect() calls
Bug: 1473134 Change-Id: Ic540bb58ab250f8c7a20307a1f666d19f195d5b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5135935 Commit-Queue: Nicolás Peña <[email protected]> Reviewed-by: Christian Biesinger <[email protected]> Cr-Commit-Position: refs/heads/main@{#1239276}
1 parent 2fc3cc6 commit 7bc216e

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
<!DOCTYPE html>
2+
<title>Federated Credential Management API two disconnect() at the same time.</title>
3+
<link rel="help" href="https://fedidcg.github.io/FedCM">
4+
<script src="/resources/testharness.js"></script>
5+
<script src="/resources/testharnessreport.js"></script>
6+
<script src="/resources/testdriver.js"></script>
7+
<script src="/resources/testdriver-vendor.js"></script>
8+
9+
<body>
10+
11+
<script type="module">
12+
import {fedcm_test,
13+
mark_signed_in,
14+
set_fedcm_cookie,
15+
fedcm_get_and_select_first_account,
16+
manifest_origin,
17+
request_options_with_mediation_required,
18+
disconnect_options} from './support/fedcm-helper.sub.js';
19+
20+
fedcm_test(async t => {
21+
await mark_signed_in();
22+
await set_fedcm_cookie();
23+
// Get at least one connected account that can be disconnected.
24+
const cred = await fedcm_get_and_select_first_account(t, request_options_with_mediation_required());
25+
const manifest = `${manifest_origin}/\
26+
credential-management/support/fedcm/manifest.py`;
27+
const options = disconnect_options("1234");
28+
IdentityCredential.disconnect(options);
29+
await promise_rejects_dom(t, 'NetworkError', IdentityCredential.disconnect(options));
30+
}, "When disconnect is called while there is a pending one, it is rejected.");
31+
</script>

0 commit comments

Comments
 (0)