Navigation Menu

Skip to content

Commit

Permalink
allowpaymentrequest was deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres committed Sep 16, 2020
1 parent c5c992c commit 4bc377d
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 51 deletions.
Expand Up @@ -24,16 +24,5 @@
expect_feature_unavailable_default, 'payment');
}, header + ' disallows cross-origin navigation in an iframe.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, same_origin_src,
expect_feature_available_default, 'payment', 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true allows same-origin navigation in an iframe.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, cross_origin_src,
expect_feature_unavailable_default, 'payment', 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true disallows cross-origin navigation in an iframe.');
</script>
</body>
12 changes: 0 additions & 12 deletions feature-policy/payment-allowed-by-feature-policy.https.sub.html
Expand Up @@ -31,17 +31,5 @@
test_feature_availability('PaymentRequest()', t, cross_origin_src,
expect_feature_available_default);
}, header + ' allows cross-origin iframes.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, same_origin_src,
expect_feature_available_default, undefined, 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true allows same-origin iframes.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, cross_origin_src,
expect_feature_available_default, undefined, 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true allows cross-origin iframes.');
</script>
</body>
12 changes: 0 additions & 12 deletions feature-policy/payment-default-feature-policy.https.sub.html
Expand Up @@ -31,17 +31,5 @@
test_feature_availability('PaymentRequest()', t, cross_origin_src,
expect_feature_unavailable_default);
}, header + ' disallows cross-origin iframes.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, same_origin_src,
expect_feature_available_default, undefined, 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true allows same-origin iframes.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, cross_origin_src,
expect_feature_available_default, undefined, 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true allows cross-origin iframes.');
</script>
</body>
12 changes: 0 additions & 12 deletions feature-policy/payment-disabled-by-feature-policy.https.sub.html
Expand Up @@ -29,17 +29,5 @@
test_feature_availability('PaymentRequest()', t, cross_origin_src,
expect_feature_unavailable_default,);
}, header + ' disallows cross-origin iframes.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, same_origin_src,
expect_feature_unavailable_default, undefined, 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true disallows same-origin iframes.');

async_test(t => {
test_feature_availability(
'PaymentRequest()', t, cross_origin_src,
expect_feature_unavailable_default, undefined, 'allowpaymentrequest');
}, header + ' allowpaymentrequest=true disallows cross-origin iframes.');
</script>
</body>
8 changes: 4 additions & 4 deletions feature-policy/resources/featurepolicy.js
Expand Up @@ -13,9 +13,9 @@ function assert_feature_policy_supported() {
// "/feature-policy/resources/feature-policy-payment.html",
// "/feature-policy/resources/feature-policy-usb.html".
// expect_feature_available: a callback(data, feature_description) to
// verify if a feature is avaiable or unavailable as expected.
// verify if a feature is available or unavailable as expected.
// The file under the path "src" defines what "data" is sent back as a
// pistMessage. Inside the callback, some tests (e.g., EXPECT_EQ,
// postMessage. Inside the callback, some tests (e.g., EXPECT_EQ,
// EXPECT_TRUE, etc) are run accordingly to test a feature's
// availability.
// Example: expect_feature_available_default(data, feature_description).
Expand All @@ -24,8 +24,8 @@ function assert_feature_policy_supported() {
// feature (https://wicg.github.io/feature-policy/#features).
// See examples at:
// https://github.com/WICG/feature-policy/blob/master/features.md
// allow_attribute: Optional argument, only used for testing fullscreen or
// payment: either "allowfullscreen" or "allowpaymentrequest" is passed.
// allow_attribute: Optional argument, only used for testing fullscreen:
// "allowfullscreen"
function test_feature_availability(
feature_description, test, src, expect_feature_available, feature_name,
allow_attribute) {
Expand Down

0 comments on commit 4bc377d

Please sign in to comment.