Bug 1936575 - PART 2: Do not trigger default browser prompt until ToS is accepted...
[gecko.git] / security / manager / ssl / tests / mochitest / mixedcontent / test_dynUnsecureBackground.html
blob7cf4006a3d697051e28b2db2282608c76527c58b
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" />
9 <script class="testbody" type="text/javascript">
10 "use strict";
12 // This test, as is, equals to https://kuix.de/misc/test17/358438.php
14 async function runTest()
16 await isSecurityState("secure");
17 document.body.background =
18 "http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg";
20 waitForSecurityState("broken", async () => {
21 await isSecurityState("broken", "document.body.background='http://...' changed to broken");
22 finish();
23 });
26 async function afterNavigationTest()
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();
35 </script>
36 </head>
38 <body background="https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg">
39 </body>
40 </html>