test_bug1550792.html (925B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <meta charset="utf-8"> 5 <title>Bug 1550792: Block insecure subresource with non-https secure context parent</title> 6 <script src="/tests/SimpleTest/SimpleTest.js"></script> 7 8 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 9 </head> 10 11 <body> 12 <script class="testbody" type="text/javascript"> 13 14 SimpleTest.waitForExplicitFinish(); 15 16 let f = document.createElement("iframe"); 17 f.src = "https://example.com/tests/dom/security/test/mixedcontentblocker/file_bug1550792.html"; 18 19 window.addEventListener("message", (event) => { 20 switch(event.data.type) { 21 case 'http': 22 is(event.data.status, "blocked", "nested load of http should be blocked."); 23 break 24 case 'https': 25 is(event.data.status, "loaded", "nested load of https should not be blocked."); 26 SimpleTest.finish(); 27 break; 28 } 29 }); 30 31 document.body.appendChild(f); 32 33 </script> 34 </body> 35 </html>