report-multiple-violations-02.html (910B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharnessreport.js"></script> 6 <title>This tests that multiple violations on a page trigger multiple reports 7 if and only if the violations are distinct.</title> 8 <!-- CSP headers 9 Content-Security-Policy-Report-Only: script-src 'unsafe-inline' 'self'; report-uri /reporting/resources/report.py?op=put&reportID={{$id}} 10 --> 11 </head> 12 <body> 13 <script> 14 for (var i = 0; i<5; i++) { 15 setTimeout("document.body.innerHTML += ('<p>PASS: setTimeout executed.');", 0); 16 } 17 setTimeout("document.body.innerHTML += ('<p>PASS: different setTimeout executed.');", 0); 18 </script> 19 <script async defer src='../support/checkReport.sub.js?reportField=violated-directive&reportValue=script-src%20%27unsafe-inline%27%20%27self%27&reportCount=2'></script> 20 </body> 21 </html>