Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <script src="../../resources/testharness.js"></script> | 2 <script src="../../resources/testharness.js"></script> |
| 3 <script src="../../resources/testharnessreport.js"></script> | 3 <script src="../../resources/testharnessreport.js"></script> |
| 4 <script src="resources/helper.js"></script> | |
| 5 <iframe allow="payment"></iframe> | |
| 6 <iframe allow="payment" allowpaymentrequest></iframe> | |
| 4 <script> | 7 <script> |
| 5 if (window.testRunner) { | 8 var srcs = [ |
| 6 testRunner.dumpAsText(); | 9 "resources/feature-policy-payment.html", |
| 7 testRunner.dumpChildFramesAsText(); | 10 "http://localhost:8000/feature-policy/resources/feature-policy-payment.html" |
| 8 } | 11 ]; |
| 12 | |
| 13 function loadFrame(iframe, src) { | |
| 14 var allowpaymentrequest = iframe.hasAttribute('allowpaymentrequest'); | |
| 15 promise_test(function() { | |
| 16 iframe.src = src; | |
| 17 return new Promise(function(resolve, reject) { | |
| 18 window.addEventListener('message', function(e) { | |
| 19 resolve(e.data); | |
| 20 }, { once: true }); | |
| 21 }).then(function(data) { | |
| 22 assert_true(data.enabled, 'Paymentrequest():'); | |
| 23 }); | |
| 24 }, 'Paymentrequest enabled by container policy on URL: ' + src + | |
| 25 ' with allowpaymentrequest = ' + allowpaymentrequest); | |
| 26 } | |
| 27 | |
| 28 window.onload = function() { | |
| 29 loadIframes(src); | |
|
iclelland
2017/05/23 14:15:03
Should be srcs?
| |
| 30 } | |
| 9 </script> | 31 </script> |
| 10 <iframe id="f1" src="resources/feature-policy-payment-enabled.html" allow="payme nt"></iframe> | |
| 11 <iframe id="f2" src="http://localhost:8000/feature-policy/resources/feature-poli cy-payment-enabled.html" allow="payment"></iframe> | |
| 12 <iframe id="f3" src="resources/feature-policy-payment-enabled.html" allowpayment request allow="payment"></iframe> | |
| 13 <iframe id="f4" src="http://localhost:8000/feature-policy/resources/feature-poli cy-payment-enabled.html" allowpaymentrequest allow="payment"></iframe> | |
| OLD | NEW |