Skip to content

Commit

Permalink
[FedCM] Do not crash the renderer when no IDPs are registered
Browse files Browse the repository at this point in the history
Bug: 335052786, 335297647
Change-Id: I3be17c8d36610508a1c9fbb00e2d53435eed568c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/5459705
Reviewed-by: Nicolás Peña <npm@chromium.org>
Auto-Submit: Christian Biesinger <cbiesinger@chromium.org>
Reviewed-by: Ian Kilpatrick <ikilpatrick@chromium.org>
Commit-Queue: Ian Kilpatrick <ikilpatrick@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1289389}
  • Loading branch information
cbiesinger authored and chromium-wpt-export-bot committed Apr 18, 2024
1 parent 6d0abd5 commit 2f45407
Showing 1 changed file with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<title>Federated Credential Management API network request tests.</title>
<link rel="help" href="https://fedidcg.github.io/FedCM">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
<script src="/resources/testdriver-vendor.js"></script>

<body>

<script type="module">
promise_test(async t => {
const cred = navigator.credentials.get({
identity: {
providers: [{
configURL: "any",
clientId: "na",
nonce: "1"
}]
}
});
return promise_rejects_dom(t, 'NetworkError', cred);
}, "When no providers are registered an error should be returned.");

</script>

0 comments on commit 2f45407

Please sign in to comment.