<html>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.setCustomPolicyDelegate(true, true);
}

function runTest()
{
    var e = document.createEvent("MouseEvents");
    e.initEvent("click", true, false);
    document.getElementById("clickTest").dispatchEvent(e);
}
</script>
<body onload="runTest();">
&lt;<a href="rdar://problem/6904941">rdar://problem/6904941</a>&gt; and <a href="https://bugs.webkit.org/show_bug.cgi?id=25300">https://bugs.webkit.org/show_bug.cgi?id=25300</a><br><br>
This tests to see what WebKit does with javascript urls of the form "javascript://".<br>
On the one hand, these are detected as hierarchical urls and usually marked invalid.<br>
On the other hand, the contents after "javascript:" are valid javascript code - a comment - that should be executed.<br>
If you click the link below and WebKit navigates - probably to an error page - then we're marking it as an invalid hierarchical URL and not trying to execute it.<br>
Instead, clicking it should appear to do nothing and you should remain at this page.<br>
In DumpRenderTree, if the custom policy delegate indicates that a load was attempted, then the test failed.<br><br>
<a id="clickTest" href="javascript://Spaceballs: The Comment!">Click me to test</a>
</body>
</html>
