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

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: Rebased FlagExpectations/site-per-process 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 <iframe allow="payment"></iframe>
5 <iframe allow="payment" allowpaymentrequest></iframe>
4 <script> 6 <script>
5 if (window.testRunner) { 7 var srcs = [
6 testRunner.dumpAsText(); 8 "resources/feature-policy-payment.html",
7 testRunner.dumpChildFramesAsText(); 9 "http://localhost:8000/feature-policy/resources/feature-policy-payment.html"
10 ];
11
12 function loadFrame(iframe, src) {
13 var allowpaymentrequest = iframe.hasAttribute('allowpaymentrequest');
14 promise_test(function() {
15 iframe.src = src;
16 return new Promise(function(resolve, reject) {
17 window.addEventListener('message', function(e) {
18 resolve(e.data);
19 }, { once: true });
20 }).then(function(data) {
21 assert_true(data.enabled, 'Paymentrequest():');
22 });
23 }, 'Paymentrequest enabled by container policy on URL: ' + src +
24 ' with allowpaymentrequest = ' + allowpaymentrequest);
25 }
26
27 window.onload = function() {
28 var iframes = document.getElementsByTagName('iframe');
29 for (var iframe of iframes) {
30 for (var src of srcs) {
31 loadFrame(iframe, src);
32 }
8 } 33 }
34 }
9 </script> 35 </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