summaryrefslogtreecommitdiffstats
path: root/dom/security/test/csp/file_upgrade_insecure_reporting.html
blob: c78e9a784d3a40320e5583343c38f3ba0c3f3a37 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<!DOCTYPE HTML>
<html>
<head>
  <meta charset="utf-8">
  <title>Bug 1139297 - Implement CSP upgrade-insecure-requests directive</title>
</head>
<body>

  <!-- upgrade img from http:// to https:// -->
  <img id="testimage" src="http://example.com/tests/dom/security/test/csp/file_upgrade_insecure_reporting_server.sjs?img"></img>

  <script type="application/javascript">
    var myImg = document.getElementById("testimage");
    myImg.onload = function(e) {
      window.parent.postMessage({result: "img-ok"}, "*");
    };
    myImg.onerror = function(e) {
      window.parent.postMessage({result: "img-error"}, "*");
    };
  </script>

</body>
</html>