test_documentWrite1.html (895B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>document.write('<img 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 async function runTest() 13 { 14 await isSecurityState("broken", "insecure <img> written dynamically breaks security"); 15 finish(); 16 } 17 18 async function afterNavigationTest() 19 { 20 await isSecurityState("broken", "security still broken after navigation"); 21 finish(); 22 } 23 24 </script> 25 </head> 26 27 <body> 28 <script class="testbody" type="text/javascript"> 29 "use strict"; 30 document.write( 31 "<img src='http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg' />"); 32 </script> 33 </body> 34 </html>