Index: third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-payment-enabled.html |
diff --git a/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-payment-enabled.html b/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-payment-enabled.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..ee07de1b6679710c119e4436b8614bbf094583e3 |
--- /dev/null |
+++ b/third_party/WebKit/LayoutTests/http/tests/feature-policy/resources/feature-policy-payment-enabled.html |
@@ -0,0 +1,19 @@ |
+<!DOCTYPE html> |
+<head> |
+ <title>Feature-Policy PaymentRequest Enabled</title> |
+ <script src="/resources/testharness.js"></script> |
+ <script src="/resources/testharnessreport.js"></script> |
+</head> |
+<script> |
+ test(function() { |
+ var supportedInstruments = [ { supportedMethods: [ 'visa' ] } ]; |
+ var details = { |
+ total: { label: 'Test', amount: { currency: 'USD', value: '5.00' } } |
+ }; |
+ try { |
+ new PaymentRequest(supportedInstruments, details); |
+ } catch (e) { |
+ assert_unreached('PaymentRequest should be enabled by FeaturePolicy'); |
+ } |
+ }, 'Any iframes may construct PaymentRequest when enabled.'); |
+</script> |