blob: 92d9cc691ce07e27845e35ad8fe70a24a1aad558 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="form-action 127.0.0.1:8000">
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
window.addEventListener('load', function() {
setTimeout(function() {
document.getElementById('submit').click();
}, 0);
});
window.addEventListener('securitypolicyviolation', e => {
document.body.innerHTML += `blockedURI = <b>${e.blockedURI}</b><br/><br/>`;
testRunner.notifyDone();
});
</script>
</head>
<body>
<form id="form1" action="/navigation/resources/redirection-response.py?host=localhost:8000&status=302&target=form-target.pl" method="post">
<input type='text' name='fieldname' value='fieldvalue'>
<input type='submit' id='submit' value='submit'>
</form>
<p>
Tests that blocking form redirect reports the correct blockedURI.
</p>
</body>
</html>