[FedCM] Dismiss the error dialog in fedcm-endpoint-redirects
If we get a redirect on the token endpoint, we get an error dialog.
Make sure to dismiss it so that the test does not timeout.
https://wpt.fyi/results/credential-management/fedcm-endpoint-redirects.https.html?label=experimental&label=master&aligned
R=npm@chromium.org
Bug: 331237776
Change-Id: Ifd37fa90f65ec7ff4a677cb348a3230e04fc7a05
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5454201
Commit-Queue: Nicolás Peña <npm@chromium.org>
Reviewed-by: Nicolás Peña <npm@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1287608}
diff --git a/credential-management/fedcm-endpoint-redirects.https.html b/credential-management/fedcm-endpoint-redirects.https.html
index 36a4de7..71dbce0 100644
--- a/credential-management/fedcm-endpoint-redirects.https.html
+++ b/credential-management/fedcm-endpoint-redirects.https.html
@@ -11,6 +11,7 @@
fedcm_test,
select_manifest,
mark_signed_in,
+ fedcm_error_dialog_dismiss,
fedcm_get_dialog_type_promise,
fedcm_get_and_select_first_account} from './support/fedcm-helper.sub.js';
@@ -35,7 +36,9 @@
await select_manifest(t, test_options);
try {
- const cred = await fedcm_get_and_select_first_account(t, test_options);
+ const cred = fedcm_get_and_select_first_account(t, test_options);
+ fedcm_error_dialog_dismiss(t);
+ await cred;
assert_unreached("An IdentityCredentialError exception should be thrown.");
} catch (e) {
assert_true(e instanceof DOMException);