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">
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");
30 async function afterNavigationTest()
32 await isSecurityState(
"secure",
"secure after navigation");
40 <img id=
"img1" src=
"https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/hugebmp.sjs" />