1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/security/manager/ssl/tests/mochitest/mixedcontent/test_dynUnsecurePicture.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,44 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>img.src changes to unsecure test</title> 1.8 + <script type="text/javascript" src="/MochiKit/Base.js"></script> 1.9 + <script type="text/javascript" src="/MochiKit/DOM.js"></script> 1.10 + <script type="text/javascript" src="/MochiKit/Style.js"></script> 1.11 + <script type="text/javascript" src="/MochiKit/Signal.js"></script> 1.12 + <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> 1.13 + <script type="text/javascript" src="mixedContentTest.js"></script> 1.14 + <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> 1.15 + 1.16 + <script class="testbody" type="text/javascript"> 1.17 + 1.18 + // This test, as is, equals to https://kuix.de/misc/test17/358438.php 1.19 + 1.20 + function runTest() 1.21 + { 1.22 + isSecurityState("secure"); 1.23 + document.getElementById("image1").src = 1.24 + "http://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg"; 1.25 + 1.26 + window.setTimeout(function() { 1.27 + isSecurityState("broken", "src='http://...' changed to broken"); 1.28 + finish(); 1.29 + }, 500); 1.30 + } 1.31 + 1.32 + function afterNavigationTest() 1.33 + { 1.34 + is(document.getElementById("image1").src, 1.35 + "https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg", 1.36 + "img.src secure again"); 1.37 + isSecurityState("secure", "security full after navigation"); 1.38 + finish(); 1.39 + } 1.40 + 1.41 + </script> 1.42 +</head> 1.43 + 1.44 +<body> 1.45 + <img id="image1" src="https://example.com/tests/security/manager/ssl/tests/mochitest/mixedcontent/moonsurface.jpg" /> 1.46 +</body> 1.47 +</html>