test_object_inherit.html (831B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Bug 1457100: Test OBJECT inherits CSP if needed</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 7 </head> 8 <body> 9 <iframe style="width:100%;" id="testframe"></iframe> 10 11 <script class="testbody" type="text/javascript"> 12 13 SimpleTest.waitForExplicitFinish(); 14 15 window.addEventListener("message", receiveMessage); 16 function receiveMessage(event) { 17 window.removeEventListener("message", receiveMessage); 18 19 var cspJSON = event.data.cspJSON; 20 ok(cspJSON.includes("img-src"), "found img-src directive"); 21 ok(cspJSON.includes("https://bug1457100.test.com"), "found img-src value"); 22 23 SimpleTest.finish(); 24 } 25 26 document.getElementById("testframe").src = "file_object_inherit.html"; 27 28 </script> 29 </body> 30 </html>