<body>
<a href="foobar.html">Nonexistent Resource</a><br>
<script>
document.open();
document.close();

if (/\/resources\/foobar.html$/.test(document.getElementsByTagName("a")[0].href))
    parent.document.getElementById("testResult").innerHTML = "SUCCESS"
    
if (window.testRunner)
    testRunner.notifyDone();
</script>
</body>
