<html>
<body>
<p>
Test that error events won't reveal any potentially sensitive script content if the latter is loaded from a different domain after a redirect. The test passes if you don't see any data from the linked resource. <a href="https://bugs.webkit.org/show_bug.cgi?id=52903">Bug 52903.</a>
</p>
<div id="result"></div>
<script>
if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}

window.addEventListener('error', function(event) {
    document.getElementById("result").textContent = "error event message: " + event.message + " at " + event.filename + ": " + event.lineno + ":" + event.colno + " " + event.error;
    if (window.testRunner)
        testRunner.notifyDone();
    return true;
});
</script>
<script src="/resources/redirect.py?url=http://localhost:8000/security/resources/cross-origin-script.txt"></script>
</body>
</html>
