Skip to content

Commit 8330b5b

Browse files
stephenmcgruermoz-wptsync-bot
authored andcommitted
Bug 1786901 [wpt PR 35602] - [SPC] Rename rp --> rpId in CollectedClientAdditionalPaymentData, a=testonly
Automatic update from web-platform-tests [SPC] Rename rp --> rpId in CollectedClientAdditionalPaymentData (#35602) See w3c/secure-payment-confirmation#198 -- wpt-commits: 642097fa4e9495f1240c098ce1cefc661ab5c444 wpt-pr: 35602
1 parent 4f24286 commit 8330b5b

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

testing/web-platform/tests/secure-payment-confirmation/authentication-accepted.https.html

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,21 @@
5858
assert_false(clientDataJSON.crossOrigin);
5959

6060
// Payment-specific information.
61-
assert_equals(clientDataJSON.payment.rp, window.location.hostname);
61+
assert_equals(clientDataJSON.payment.rpId, window.location.hostname);
6262
assert_equals(clientDataJSON.payment.topOrigin, window.location.origin);
6363
assert_equals(clientDataJSON.payment.payeeOrigin, payeeOrigin);
6464
assert_equals(clientDataJSON.payment.total.value, PAYMENT_DETAILS.total.amount.value);
6565
assert_equals(clientDataJSON.payment.total.currency, PAYMENT_DETAILS.total.amount.currency);
6666
assert_equals(clientDataJSON.payment.instrument.icon, ICON_URL);
6767
assert_equals(clientDataJSON.payment.instrument.displayName, displayName);
6868

69+
// If the User Agent still supports the legacy 'rp' output parameter, it
70+
// should be identical to the 'rpId' output parameter. See
71+
// https://github.com/w3c/secure-payment-confirmation/pull/198
72+
if ('rp' in clientDataJSON.payment) {
73+
assert_equals(clientDataJSON.payment.rp, clientDataJSON.payment.rpId);
74+
}
75+
6976
// TODO: Verify cred.response.signature, to validate that it covers all fields
7077
// from clientDataJSON.
7178
}, 'Successful SPC authentication');

testing/web-platform/tests/secure-payment-confirmation/authentication-cross-origin.sub.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@
6666
// The origin should be ourselves, whilst the RP should be the alt hostname
6767
// (as the owner of the credential).
6868
assert_equals(clientDataJSON.origin, window.location.origin);
69-
assert_equals(clientDataJSON.payment.rp, '{{hosts[alt][]}}');
69+
assert_equals(clientDataJSON.payment.rpId, '{{hosts[alt][]}}');
7070
}, 'Cross-origin SPC authentication ceremony');
7171
</script>

testing/web-platform/tests/secure-payment-confirmation/authentication-in-iframe.sub.https.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
assert_equals(result.clientDataJSON.origin, 'https://{{hosts[alt][]}}:{{ports[https][0]}}');
7676
assert_equals(result.clientDataJSON.payment.topOrigin, window.location.origin);
7777
// The credential was created in this frame, and so we are the rp.
78-
assert_equals(result.clientDataJSON.payment.rp, window.location.hostname);
78+
assert_equals(result.clientDataJSON.payment.rpId, window.location.hostname);
7979
// The payeeOrigin should be unrelated to what the origin and topOrigin are.
8080
assert_equals(result.clientDataJSON.payment.payeeOrigin, 'https://merchant.com');
8181
}, 'SPC authentication ceremony in cross-origin iframe');

0 commit comments

Comments
 (0)