blob: f7c06f7aa77e1bd3872c72680ff1f99f1e01a365 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<body>
<script src="../resources/securitypolicy-tests-base.js"></script>
<script>
if (document.securityPolicy.allowsFormAction('http://example.com/'))
log('PASS form action is allowed when no policy exists.');
else
log('FAIL form action is not allowed when no policy exists.');
injectPolicy("form-action http://notexample.com;");
if (!document.securityPolicy.allowsFormAction('http://example.com/'))
log('PASS form action is not allowed when policy exists.');
else
log('FAIL form action is allowed when policy exists.');
</script>
</body>
</html>