test-csp-many-errors.html (561B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="UTF-8"> 5 <title>Test for Bug 1839165 - Verify that we warn about too many reports.</title> 6 <!-- Any copyright is dedicated to the Public Domain. 7 http://creativecommons.org/publicdomain/zero/1.0/ --> 8 </head> 9 <body> 10 <div></div> 11 <script> 12 "use strict"; 13 14 function run() { 15 const div = document.querySelector("div"); 16 // We limit the number of allowed CSP reports to 10. 17 for (let i = 0; i < 15; i++) { 18 div.setAttribute("style", `background-color: rgb(0, 0, ${i});`); 19 } 20 } 21 run(); 22 </script> 23 </body> 24 </html>