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