Bug 1938475 [Wayland] Fallback to monitor screen scale if we're missing wayland surfa...
[gecko.git] / security / manager / ssl / tests / mochitest / mixedcontent / test_bug472986.html
blobd38efb2a40191a86a1ab104e8c77a7abfe8d15a1
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>img.src replace</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 SimpleTest.expectAssertions(0, 4);
14 // Clear the default onload assigned to test start because we must
15 // wait for replaced image to load and only after that test the security state
16 var onLoadFunction = window.onload;
17 window.onload = function()
19 let img1 = document.getElementById("img1");
20 img1.addEventListener("load", onLoadFunction);
21 img1.src = "https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg";
24 async function runTest()
26 await isSecurityState("secure", "secure");
27 finish();
30 async function afterNavigationTest()
32 await isSecurityState("secure", "secure after navigation");
33 finish();
36 </script>
37 </head>
39 <body>
40 <img id="img1" src="https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/hugebmp.sjs" />
41 </body>
42 </html>