Source code

Revision control

Copy as Markdown

Other Tools

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Bug 1704454 - HTTPS FIRST Mode</title>
<!-- style -->
<link rel='stylesheet' type='text/css' href='http://example.com/tests/dom/security/test/https-first/file_upgrade_insecure_server.sjs?style' media='screen' />
<!-- font -->
<style>
@font-face {
font-family: "foofont";
}
.div_foo { font-family: "foofont"; }
</style>
</head>
<body>
<!-- images: -->
<!-- redirects: upgrade http:// to https:// redirect to http:// and then upgrade to https:// again -->
<!-- script: -->
<!-- media: -->
<!-- objects: -->
<!-- font: (apply font loaded in header to div) -->
<div class="div_foo">foo</div>
<!-- iframe: (same origin) -->
<!-- within that iframe we load an image over http and make sure the requested gets upgraded to https -->
</iframe>
<!-- toplevel: -->
<script type="application/javascript">
//close right after opening
myWin.onunload = function(){
myWin.close();
}
</script>
<!-- xhr: -->
<script type="application/javascript">
var myXHR = new XMLHttpRequest();
myXHR.send(null);
</script>
<!-- form action: (upgrade POST from http:// to https://) -->
<iframe name='formFrame' id='formFrame'></iframe>
<input name="foo" value="foo">
<input type="submit" id="submitButton" formenctype='multipart/form-data' value="Submit form">
</form>
<script type="text/javascript">
var submitButton = document.getElementById('submitButton');
submitButton.click();
</script>
</body>
</html>