blob: 827a36854fad1a43583b20d885ddb24e8537f493 [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Security-Policy" content="form-action 'none'">
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
testRunner.clearBackForwardList();
testRunner.dumpBackForwardList();
}
window.addEventListener('load', function() {
setTimeout(function() {
document.getElementById('submit').click();
}, 0);
});
setTimeout(function () {
testRunner.notifyDone();
}, 1000);
</script>
</head>
<body>
<form action='javascript:alert("RAN CODE INCORRECTLY!")' id='theform' method='post'>
<input type='text' name='fieldname' value='fieldvalue'>
<input type='submit' id='submit' value='submit'>
</form>
<p>
Tests that blocking form actions works correctly. If this test passes, you will see a console error, and will not see a JavaScript alert.
</p>
</body>
</html>