Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(471)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/feature-policy/payment-allowed-by-container-policy.html

Issue 2855133004: Re-enable feature policy layout tests after bug fix. (Closed)
Patch Set: Codereview: nit Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698