| <!DOCTYPE HTML> |
| <body> |
| <head> |
| <script src="../../resources/js-test.js"></script> |
| </head> |
| <script> |
| description("Performing mixed content checks in a detached setting shouldn't crash."); |
| |
| window.jsTestIsAsync = true; |
| |
| var w; |
| var xhr; |
| function processMessage(event) { |
| if (event.data == "opened") { |
| xhr = new w.XMLHttpRequest(); |
| xhr.open('GET', 'http://user:pass@127.0.0.1:8000/doesNotExist', false); |
| w.close(); |
| } else if (event.data == "closed") { |
| shouldThrow("xhr.send()"); |
| finishJSTest(); |
| } |
| } |
| |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.setCanOpenWindows(); |
| } |
| w = window.open('../../resources/window-postmessage-open-close.html'); |
| window.addEventListener("message", processMessage, false); |
| </script> |
| </body> |