test_bug521461.html (1139B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>Bug 521461</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 SimpleTest.requestFlakyTimeout("Timeout in mixedContentTest"); 12 13 loadAsInsecure = true; 14 15 async function runTest() 16 { 17 window.location = "https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/nocontent.sjs"; 18 window.setTimeout(async () => { 19 await isSecurityState("insecure", "location.href doesn't effect the security state"); 20 is(document.body.innerHTML, "This is an unsecure page!\n", "Document has not changed content"); 21 finish(); 22 }, 1000); 23 } 24 25 async function afterNavigationTest() 26 { 27 await isSecurityState("insecure", "still not secure after navigation"); 28 is(document.body.innerHTML, "This is an unsecure page!\n", "Document has not changed content"); 29 finish(); 30 } 31 32 </script> 33 </head> 34 35 <body>This is an unsecure page!</body></html>