mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-22 17:55:50 +00:00
Bug 1459622 [wpt PR 10872] - PaymentHandler: Change topLevelOrigin to topOrigin, a=testonly
Automatic update from web-platform-testsPaymentHandler: Change topLevelOrigin to topOrigin (#10872) The related spec was changed: https://github.com/w3c/payment-handler/pull/301 Bug: 840041 Change-Id: Ic76fffe0b974210edc3888378ded197d06e035b7 -- wpt-commits: da28291ff0b1b6ee6a36004e8deef9c2f098935d wpt-pr: 10872
This commit is contained in:
parent
20d5c687ac
commit
b8d781a015
@ -592126,7 +592126,7 @@
|
||||
"support"
|
||||
],
|
||||
"payment-handler/app-can-make-payment.js": [
|
||||
"95d11a09c5468bcea9172e1511be5c8fa5b4d9d7",
|
||||
"f789d5de3dcb915d66ca43142c940ac74fcedf6a",
|
||||
"support"
|
||||
],
|
||||
"payment-handler/basic-card.js": [
|
||||
@ -592142,7 +592142,7 @@
|
||||
"testharness"
|
||||
],
|
||||
"payment-handler/can-make-payment-event-constructor.https.worker.js": [
|
||||
"39e90eca2f6cb7d4fa62655a1aa492acea30f436",
|
||||
"4a77b5b3444c490b673b7c08862f1565b705f0e2",
|
||||
"testharness"
|
||||
],
|
||||
"payment-handler/can-make-payment-event.https.html": [
|
||||
|
@ -76,9 +76,9 @@ self.addEventListener('canmakepayment', event => {
|
||||
}
|
||||
|
||||
const methodAsURL = new URL(methodName);
|
||||
if (event.topLevelOrigin !== methodAsURL.origin) {
|
||||
const msg = `Unexpected event.topLevelOrigin: "${
|
||||
event.topLevelOrigin
|
||||
if (event.topOrigin !== methodAsURL.origin) {
|
||||
const msg = `Unexpected event.topOrigin: "${
|
||||
event.topOrigin
|
||||
}". Expected "${methodAsURL.origin}".`;
|
||||
event.respondWith(Promise.reject(new Error(msg)));
|
||||
return;
|
||||
|
@ -30,13 +30,13 @@ test(() => {
|
||||
|
||||
test(() => {
|
||||
const ev = new CanMakePaymentEvent('test', {
|
||||
topLevelOrigin: 'https://foo.com',
|
||||
topOrigin: 'https://foo.com',
|
||||
paymentRequestOrigin: 'https://bar.com',
|
||||
methodData: [],
|
||||
modifiers: [],
|
||||
});
|
||||
assert_false(ev.isTrusted, 'constructed in script, so not be trusted');
|
||||
assert_equals(ev.topLevelOrigin, 'https://foo.com');
|
||||
assert_equals(ev.topOrigin, 'https://foo.com');
|
||||
assert_equals(ev.paymentRequestOrigin, 'https://bar.com');
|
||||
}, 'CanMakePaymentEvent can be constructed with a CanMakePaymentEventInit, even if not trusted');
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user