blob: 5b80462ea206df1d0c48b581f62653ce4c25d578 [file] [log] [blame]
<head>
<script>
function subframeLoaded()
{
document.getElementById("result").appendChild(document.createTextNode("SUCCESS: The subframe loaded."));
if (window.testRunner)
testRunner.notifyDone();
}
function runTest()
{
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var subframeLocation = window.location + "";
subframeLocation = subframeLocation.replace(/file:\/\/\//, "file://:1/");
subframeLocation = subframeLocation.replace(/file-URL-with-port-number/, "resources/empty-subframe");
var subframe = document.getElementById("subframe");
subframe.onload = subframeLoaded;
subframe.contentWindow.location = subframeLocation;
}
</script>
</head>
<body onload="runTest()">
<p>This tests whether we can load a file URL with a port number in the URL. It should be ignored, and so the load should succeed.</p>
<p id="result"></p>
<iframe id="subframe" width="20" height="20"></iframe>
</body>