PageRenderTime 17ms CodeModel.GetById 9ms app.highlight 6ms RepoModel.GetById 1ms app.codeStats 0ms

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

http://github.com/zpao/v8monkey
HTML | 43 lines | 37 code | 6 blank | 0 comment | 0 complexity | 5d07d5636183e8a1937261875fd1479e MD5 | raw file
 1<!DOCTYPE HTML>
 2<html>
 3<head>
 4  <title>img.src replace</title>
 5  <script type="text/javascript" src="/MochiKit/Base.js"></script>
 6  <script type="text/javascript" src="/MochiKit/DOM.js"></script>
 7  <script type="text/javascript" src="/MochiKit/Style.js"></script>
 8  <script type="text/javascript" src="/MochiKit/Signal.js"></script>
 9  <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10  <script type="text/javascript" src="mixedContentTest.js"></script>
11  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" />
12
13  <script class="testbody" type="text/javascript">
14
15  // Clear the default onload assigned to test start because we must
16  // wait for replaced image to load and only after that test the security state
17  var onLoadFunction = window.onload;
18  window.onload = function()
19  {
20    var img1 = document.getElementById("img1");
21    img1.addEventListener("load", onLoadFunction, false);
22    img1.src = "https://example.com/tests/security/ssl/mixedcontent/moonsurface.jpg";
23  }
24
25  function runTest()
26  {
27    isSecurityState("secure", "secure");
28    finish();
29  }
30
31  function afterNavigationTest()
32  {
33    isSecurityState("secure", "secure after navigation");
34    finish();
35  }
36  
37  </script>
38</head>
39
40<body>
41  <img id="img1" src="https://example.com/tests/security/ssl/mixedcontent/hugebmp.sjs" />
42</body>
43</html>