blob: 02d39ede3aaa91ebb4f0ff794de2323a280bee57 [file] [log] [blame]
<!doctype html>
<body onload="test()">
<p><a href="https://bugs.webkit.org/show_bug.cgi?id=25420">bug 25240</a></p>
<script>
if (window.testRunner) {
testRunner.dumpAsText()
testRunner.waitUntilDone()
}
function test() {
try {
window.x = frames[0].XMLHttpRequest
} catch(e) { alert(e) }
frames[0].frameElement.onload = function() {
var client
try {
client = new window.x()
client.open("GET", "/xmlhttprequest/resources/echo-host.php", false)
client.send("")
} catch(e)
{
}
// FAIL if loaded data from another domain.
document.getElementById("result").innerHTML = (client && client.responseText.match(/localhost/)) ? "FAIL" : "PASS"
if (window.testRunner)
testRunner.notifyDone()
}
frames[0].location = frames[0].location.toString().replace("127.0.0.1", "localhost")
}
</script>
<iframe src="resources/echo-host.php"></iframe>
<div id=result>FAIL: Script did not run.</div>
</body>