Skip to content

Commit 5268162

Browse files
committed
Bug 1979220 [wpt PR 53970] - Reland "[FedCM] Adding disconnect to reset test state.", a=testonly
Automatic update from web-platform-tests Reland "[FedCM] Adding disconnect to reset test state." This is a reland of commit 35632c9ba41725c5fabdb14ea66b00af64f83796 Original change's description: > [FedCM] Adding disconnect to reset test state. > > Test results are affected because of previously run tests. > Disconnect helps in resetting the test state for each test case. > > Bug: 41482163 > Change-Id: Ib97c2ff69ba0d01f886947c0969190c778bb7986 > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6780242 > Commit-Queue: Christian Biesinger <cbiesingerchromium.org> > Commit-Queue: Jaimukund Bhan <bhanjaimukundgmail.com> > Reviewed-by: Nicolás Peña <npmchromium.org> > Reviewed-by: Christian Biesinger <cbiesingerchromium.org> > Cr-Commit-Position: refs/heads/main{#1491540} Bug: 41482163 Change-Id: Ib7702a52ea5215993e74ea696d7bbf19a505a98b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/6784548 Commit-Queue: Jaimukund Bhan <bhanjaimukundgmail.com> Reviewed-by: Christian Biesinger <cbiesingerchromium.org> Reviewed-by: Nicolás Peña <npmchromium.org> Cr-Commit-Position: refs/heads/main{#1491717} -- wpt-commits: 8f41f6f6c950b5b921a6558e65cee20cdb7577e1 wpt-pr: 53970 UltraBlame original commit: 636b4e63c769b9c88c6e2a0485f0e7b5a7b12cee
1 parent cb606c9 commit 5268162

File tree

5 files changed

+18
-8
lines changed

5 files changed

+18
-8
lines changed

testing/web-platform/tests/fedcm/fedcm-authz/fedcm-disclosure-text-shown.https.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
22
<title>Federated Credential Management API network request tests.</title>
3+
<meta name="timeout" content="long">
34
<link rel="help" href="https://fedidcg.github.io/FedCM">
45
<script src="/resources/testharness.js"></script>
56
<script src="/resources/testharnessreport.js"></script>

testing/web-platform/tests/fedcm/fedcm-context.https.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
22
<title>Federated Credential Management API context tests.</title>
3+
<meta name="timeout" content="long">
34
<link rel="help" href="https://fedidcg.github.io/FedCM">
45
<script src="/resources/testharness.js"></script>
56
<script src="/resources/testharnessreport.js"></script>

testing/web-platform/tests/fedcm/fedcm-multi-idp/fedcm-too-many-idps.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
nonce: '2'
2323
});
2424
}
25-
assert_throws_js(TypeError, navigator.credentials.get({
25+
return promise_rejects_js(t, TypeError, navigator.credentials.get({
2626
identity: {
2727
providers: providers,
2828
}

testing/web-platform/tests/fedcm/fedcm-storage-access-api-autogrant.tentative.https.sub.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
<!DOCTYPE html>
22
<title>Federated Credential Management API / Storage Access API autogrants tests.</title>
3+
<meta name="timeout" content="long">
34
<link rel="help" href="https://fedidcg.github.io/FedCM">
45
<link rel="help" href="https://privacycg.github.io/storage-access/">
56
<script src="/resources/testharness.js"></script>

testing/web-platform/tests/fedcm/support/fedcm-helper.sub.js

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -130,20 +130,27 @@ export function fedcm_test(test_func, test_name) {
130130
promise_test(async t => {
131131
assert_implements(window.IdentityCredential, "FedCM is not supported");
132132

133-
try {
134-
await navigator.credentials.preventSilentAccess();
135-
} catch (ex) {
136-
137-
138-
}
139-
140133

141134
try {
142135
await test_driver.set_fedcm_delay_enabled(false);
143136
} catch (e) {
144137

145138
}
146139

140+
t.add_cleanup(async () => {
141+
try {
142+
await IdentityCredential.disconnect(alt_disconnect_options(""));
143+
} catch (ex){
144+
145+
}
146+
147+
try {
148+
await IdentityCredential.disconnect(disconnect_options(""));
149+
} catch (ex){
150+
151+
}
152+
});
153+
147154
await set_fedcm_cookie();
148155
await set_alt_fedcm_cookie();
149156
await test_func(t);

0 commit comments

Comments
 (0)