<html>
<head>
<script>
function debug(str) {
var d = document.getElementById('console');
d.appendChild(document.createTextNode(str));
}
function runTests() {
if (window.testRunner)
testRunner.dumpAsText();
var str = window.location.href;
if (str.substr(0, 17) == 'file://localhost/' ||
str.substr(0, 8) == 'file:///')
debug('SUCCESS');
else
debug('FAILURE. String is ' + str);
}
</script>
</head>
<body onload="runTests();">
This tests that window.location.href serializes file urls correctly. If the test is successful, the text "SUCCESS" should be shown below.
<pre id="console">
</pre>
</body>
</html>