<html>
<head><title>Page with dynamic insecure content</title>
<script>
function loadBadImage() {
var image = document.getElementById("my_image");
return new Promise(resolve => {
image.addEventListener('load', () => {
document.getElementById("status_text").innerHTML = "Bad image loaded";
resolve(true);
});
image.src = "http://REPLACE_WITH_HOST_AND_PORT/ssl/google_files/logo.gif";
});
}
</script>
</head>
<body>
This page has some java-script that loads some insecure content.
<br><br>
You can also press the button below to load the image.
<br>
<input type=button value="Load image" onclick="loadBadImage();"></input>
<div id="status_text">Contents is OK</div>
<img id="my_image" src=""/>
</body>
</html>