Skip to content

Commit

Permalink
Rename url to configURL and change configURL to take file name
Browse files Browse the repository at this point in the history
w3c-fedid/FedCM#284

Bug: 1339372, 1336662
Change-Id: I28bfcfd332747587c52bc97710838528deecc0e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3746298
Commit-Queue: Zachary Tan <[email protected]>
Reviewed-by: Christian Biesinger <[email protected]>
Cr-Commit-Position: refs/heads/main@{#1021406}
  • Loading branch information
tttzach authored and chromium-wpt-export-bot committed Jul 6, 2022
1 parent 4a9b731 commit d974506
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
20 changes: 10 additions & 10 deletions credential-management/fedcm-network-requests.sub.https.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
const test_options = {
federated: {
providers: [{
url: url_prefix,
configURL: url_prefix + 'fedcm.json',
clientId: '1',
nonce: '2',
}]
Expand Down Expand Up @@ -53,25 +53,25 @@
}
});
return promise_rejects_js(t, TypeError, cred);
}, "Reject when url is missing" );
}, "Reject when configURL is missing" );

promise_test(async t => {
const cred = navigator.credentials.get({
federated: {
providers: [{
url: 'test',
configURL: 'test',
clientId: '1',
}]
}
});
return promise_rejects_dom(t, "InvalidStateError", cred);
}, "Reject when url is invalid");
}, "Reject when configURL is invalid");

promise_test(async t => {
const cred = navigator.credentials.get({
federated: {
providers: [{
url: 'https://idp.test',
configURL: 'https://idp.test/fedcm.json',
clientId: '',
}]
}
Expand All @@ -83,7 +83,7 @@
const cred = await navigator.credentials.get({
federated: {
providers: [{
url: url_prefix,
configURL: url_prefix + 'fedcm.json',
clientId: '1',
}]
}
Expand All @@ -95,7 +95,7 @@
const cred = navigator.credentials.get({
federated: {
providers: [{
url: 'https://idp.test',
configURL: 'https://idp.test/fedcm.json',
}]
}
});
Expand Down Expand Up @@ -129,13 +129,13 @@
const cred = navigator.credentials.get({
federated: {
providers: [{
url: 'https://other-idp.test/',
configURL: 'https://other-idp.test/fedcm.json',
clientId: '1',
}]
}
});
return promise_rejects_dom(t, "NetworkError", cred);
}, "Provider URL should honor Content-Security-Policy.");
}, "Provider configURL should honor Content-Security-Policy.");

promise_test(async t => {
await set_fedcm_cookie();
Expand All @@ -148,7 +148,7 @@
const cred = navigator.credentials.get({
federated: {
providers: [{
url: url_prefix + "fedcm-manifest-not-in-list/",
configURL: url_prefix + 'fedcm-manifest-not-in-list/fedcm.json',
clientId: '1',
nonce: '2',
}]
Expand Down
2 changes: 1 addition & 1 deletion credential-management/support/fedcm-iframe.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
const test_options = {
federated: {
providers: [{
url: 'https://idp.test',
configURL: 'https://idp.test/fedcm.json',
clientId: '1',
nonce: '2',
}]
Expand Down

0 comments on commit d974506

Please sign in to comment.