gecko-dev/dom/security/test/csp/file_upgrade_insecure_repor...

24 строки
654 B
HTML

<!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>