blob: 61ba3db3b77bdc069cb2427c936b68b1e21ab9c1 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<script src="resources/utilities.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.setXSSAuditorEnabled(true);
}
function done()
{
function navigateToReport() {
window.location = "/security/contentSecurityPolicy/resources/echo-report.php";
}
// We assume that if redirects were followed when saving the report that they will complete within one second.
// FIXME: Is there are better way to test that a redirect did not occur?
window.setTimeout(navigateToReport, 1000);
}
</script>
</head>
<body>
<p>This tests that a redirect is not followed when sending an X-XSS-Protection report. This test PASSED if the filename of the REQUEST_URI in the dumped report is save-report-and-redirect-to-save-report.php. Otherwise, it FAILED.</p>
<iframe id="frame" name="frame" src="http://127.0.0.1:8000/security/xssAuditor/resources/echo-intertag.pl?test=/security/xssAuditor/report-script-tag-and-do-not-follow-redirect-when-sending-report.html&enable-report-with-redirect=1&q=<script>alert(String.fromCharCode(0x58,0x53,0x53))</script><p>If you see this message, no JavaScript alert(), and a dump of the report below, then the test PASSED.</p>" onload="done()">
</iframe>
</body>
</html>