test_dynUnsecureBackground.html (1265B)
1 <!DOCTYPE HTML> 2 <html> 3 <head> 4 <title>body.background changes to unsecure test</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 // This test, as is, equals to https://kuix.de/misc/test17/358438.php 13 14 async function runTest() 15 { 16 await isSecurityState("secure"); 17 document.body.background = 18 "http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg"; 19 20 waitForSecurityState("broken", async () => { 21 await isSecurityState("broken", "document.body.background='http://...' changed to broken"); 22 finish(); 23 }); 24 } 25 26 async function afterNavigationTest() 27 { 28 is(document.body.background, 29 "https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg", 30 "document backround secure again"); 31 await isSecurityState("secure", "secure after re-navigation"); 32 finish(); 33 } 34 35 </script> 36 </head> 37 38 <body background="https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg"> 39 </body> 40 </html>