test_documentWrite2.html (938B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>document.write('<iframe src="http://">')</title> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <script type="text/javascript" src="mixedContentTest.js"></script> 7 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 8 9 <script class="testbody" type="text/javascript"> 10 "use strict"; 11 12 hasMixedActiveContent = true; 13 14 async function runTest() 15 { 16 await isSecurityState("broken", "insecure iframe written dynamically breaks security"); 17 finish(); 18 } 19 20 async function afterNavigationTest() 21 { 22 await isSecurityState("broken", "security still broken after navigation"); 23 finish(); 24 } 25 26 </script> 27 </head> 28 29 <body> 30 <script class="testbody" type="text/javascript"> 31 "use strict"; 32 document.write( 33 "<iframe src='http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/iframe.html'></iframe>"); 34 </script> 35 </body> 36 </html>