Bug 1936575 - PART 2: Do not trigger default browser prompt until ToS is accepted...
[gecko.git] / security / manager / ssl / tests / mochitest / mixedcontent / test_innerHtmlDelayedUnsecurePicture.html
blobc5096185987967b39962a12719c3a64f3bb03923
1 <!DOCTYPE HTML>
2 <html>
3 <head>
4 <title>innerHTML 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";
11 SimpleTest.requestFlakyTimeout("Timeout in mixedContentTest");
13 async function runTest()
15 await isSecurityState("secure");
17 window.setTimeout(function () {
18 document.getElementById("buddy").innerHTML =
19 "<img id='image1' src='http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg' />";
20 }, 1);
22 waitForSecurityState("broken", async () => {
23 await isSecurityState("broken", "innerHTML loading insecure changed to broken");
24 finish();
25 });
28 async function afterNavigationTest()
30 is(document.getElementById("buddy").innerHTML, "\n", "innerHTML back to previous");
31 await isSecurityState("secure");
32 finish();
35 </script>
36 </head>
38 <body id="buddy"></body></html>