OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <head> | 2 <title>Feature-Policy PaymentRequest Enabled</title> |
3 <title>Feature-Policy PaymentRequest Enabled</title> | 3 <script src="/resources/testharness.js"></script> |
4 <script src="/resources/testharness.js"></script> | 4 <script src="/resources/testharnessreport.js"></script> |
5 <script src="/resources/testharnessreport.js"></script> | |
6 </head> | |
7 <script> | 5 <script> |
8 test(function() { | 6 test(function() { |
9 var supportedInstruments = [ { supportedMethods: [ 'visa' ] } ]; | 7 var supportedInstruments = [ { supportedMethods: [ 'visa' ] } ]; |
10 var details = { | 8 var details = { |
11 total: { label: 'Test', amount: { currency: 'USD', value: '5.00' } } | 9 total: { label: 'Test', amount: { currency: 'USD', value: '5.00' } } |
12 }; | 10 }; |
13 try { | 11 try { |
14 new PaymentRequest(supportedInstruments, details); | 12 new PaymentRequest(supportedInstruments, details); |
15 } catch (e) { | 13 } catch (e) { |
16 assert_unreached('PaymentRequest should be enabled by FeaturePolicy'); | 14 assert_unreached('PaymentRequest should be enabled by FeaturePolicy'); |
17 } | 15 } |
18 }, 'Any iframes may construct PaymentRequest when enabled.'); | 16 }, 'Any iframes may construct PaymentRequest when enabled.'); |
19 </script> | 17 </script> |
OLD | NEW |