| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head><title>Page with dynamic insecure content</title> | 2 <head><title>Page with dynamic insecure content</title> |
| 3 | 3 |
| 4 <script> | 4 <script> |
| 5 function loadBadImage() { | 5 function loadBadImage(scheme) { |
| 6 scheme = (typeof scheme === 'undefined') ? 'http' : scheme; |
| 6 var image = document.getElementById("my_image"); | 7 var image = document.getElementById("my_image"); |
| 7 image.src = "http://REPLACE_WITH_HOST_AND_PORT/files/ssl/google_files/logo.g
if"; | 8 image.src = scheme + "://REPLACE_WITH_HOST_AND_PORT/files/ssl/google_files/l
ogo.gif"; |
| 8 checkForLoadFinished(); | 9 checkForLoadFinished(); |
| 9 } | 10 } |
| 10 | 11 |
| 11 function checkForLoadFinished() { | 12 function checkForLoadFinished() { |
| 12 var image = document.getElementById("my_image"); | 13 var image = document.getElementById("my_image"); |
| 13 if (image.complete) { | 14 if (image.complete) { |
| 14 document.getElementById("status_text").innerHTML = "Bad image loaded"; | 15 document.getElementById("status_text").innerHTML = "Bad image loaded"; |
| 15 window.domAutomationController.send(true); | 16 window.domAutomationController.send(true); |
| 16 } else { | 17 } else { |
| 17 setTimeout("checkForLoadFinished()", 500); | 18 setTimeout("checkForLoadFinished()", 500); |
| 18 } | 19 } |
| 19 } | 20 } |
| 20 </script> | 21 </script> |
| 21 | 22 |
| 22 </head> | 23 </head> |
| 23 <body> | 24 <body> |
| 24 | 25 |
| 25 This page has some java-script that loads some insecure content. | 26 This page has some java-script that loads some insecure content. |
| 26 <br><br> | 27 <br><br> |
| 27 You can also press the button below to load the image. | 28 You can also press the button below to load the image. |
| 28 <br> | 29 <br> |
| 29 <input type=button value="Load image" onclick="loadBadImage();"></input> | 30 <input type=button value="Load image" onclick="loadBadImage();"></input> |
| 30 | 31 |
| 31 <div id="status_text">Contents is OK</div> | 32 <div id="status_text">Contents is OK</div> |
| 32 <img id="my_image" src=""/> | 33 <img id="my_image" src=""/> |
| 33 | 34 |
| 34 | 35 |
| 35 </body> | 36 </body> |
| 36 </html> | 37 </html> |
| OLD | NEW |