gecko/security/manager/ssl/tests/mochitest/mixedcontent/test_bug472986.html

43 lines
1.2 KiB
HTML
Raw Normal View History

<!DOCTYPE HTML>
<html>
<head>
<title>img.src replace</title>
<script type="text/javascript" src="/MochiKit/packed.js"></script>
<script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
<script type="text/javascript" src="mixedContentTest.js"></script>
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
<script class="testbody" type="text/javascript">
// Clear the default onload assigned to test start because we must
// wait for replaced image to load and only after that test the security state
var onLoadFunction = window.onload;
window.onload = function()
{
window.setTimeout(onLoadFunction, 500);
}
function runTest()
{
isSecurityState("secure", "secure");
finish();
}
function afterNavigationTest()
{
isSecurityState("secure", "secure after navigation");
finish();
}
</script>
</head>
<body>
<img id="img1" src="https://example.com/tests/security/ssl/mixedcontent/hugebmp.sjs" />
<script type="text/javascript">
var img1 = document.getElementById("img1");
img1.src = "https://example.com/tests/security/ssl/mixedcontent/moonsurface.jpg";
</script>
</body>
</html>