|
11 | 11 |
|
12 | 12 | <script type="module"> |
13 | 13 | import {fedcm_test, |
14 | | - mark_signed_in, |
15 | 14 | disconnect_options, |
16 | 15 | fedcm_get_and_select_first_account, |
17 | 16 | fedcm_select_account_promise, |
|
22 | 21 | set_alt_fedcm_cookie} from './support/fedcm-helper.sub.js'; |
23 | 22 |
|
24 | 23 | fedcm_test(async t => { |
25 | | - await mark_signed_in(alt_manifest_origin); |
26 | 24 | // Get at least one connected account that can be disconnected. |
27 | 25 | const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); |
28 | 26 | // The IDP implementation will accept any account hint, so this is really testing that the user |
|
48 | 46 | }, 'Test that disconnect fails when there is no account to disconnect'); |
49 | 47 |
|
50 | 48 | fedcm_test(async t => { |
51 | | - await mark_signed_in(alt_manifest_origin); |
52 | 49 | const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); |
53 | 50 |
|
54 | 51 | return IdentityCredential.disconnect(alt_disconnect_options("1234")); |
55 | 52 | }, 'Test that disconnect succeeds when there is an account to disconnect'); |
56 | 53 |
|
57 | 54 | fedcm_test(async t => { |
58 | | - await mark_signed_in(alt_manifest_origin); |
59 | 55 | const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); |
60 | 56 |
|
61 | 57 | await IdentityCredential.disconnect(alt_disconnect_options("1234")); |
|
65 | 61 | }, 'Test that disconnecting the same account twice results in failure.'); |
66 | 62 |
|
67 | 63 | fedcm_test(async t => { |
68 | | - await mark_signed_in(alt_manifest_origin); |
69 | 64 | const cred = await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); |
70 | 65 | // A connected account is guaranteed by the above, and IDP accepts any account hint, so this tests |
71 | 66 | // that the user agent allows the request to go through to the IDP. |
72 | 67 | return IdentityCredential.disconnect(alt_disconnect_options("noMatch")); |
73 | 68 | }, 'Disconnect passing an incorrect ID can still succeed'); |
74 | 69 |
|
75 | 70 | fedcm_test(async t => { |
76 | | - await mark_signed_in(); |
77 | | - await mark_signed_in(alt_manifest_origin); |
78 | 71 | await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); |
79 | 72 | await fedcm_get_and_select_first_account(t, |
80 | 73 | request_options_with_mediation_required()); |
|
86 | 79 | }, 'Disconnect is bound to each IDP'); |
87 | 80 |
|
88 | 81 | fedcm_test(async t => { |
89 | | - await mark_signed_in(alt_manifest_origin); |
90 | 82 | // Get at least one connected account that can be disconnected. |
91 | 83 | await fedcm_get_and_select_first_account(t, alt_request_options_with_mediation_required()); |
92 | 84 |
|
|
0 commit comments