Source code
Revision control
Copy as Markdown
Other Tools
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
</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>