Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto.html

Issue 132613003: CSP 1.1: Remove the 'SecurityPolicy' interface. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
2 <html>
3 <body>
4 <script src="../resources/securitypolicy-tests-base.js"></script>
5 <script>
6 if (document.securityPolicy.allowsConnectionTo('http://example.com/'))
7 log('PASS connection is allowed when no policy exists.');
8 else
9 log('FAIL connection is not allowed when no policy exists.');
10
11
12 injectPolicy("connect-src http://notexample.com;");
13
14 if (!document.securityPolicy.allowsConnectionTo('http://example.com/'))
15 log('PASS connection is not allowed when policy exists.');
16 else
17 log('FAIL connection is allowed when policy exists.');
18 </script>
19 </body>
20 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicy-allowconnectionto-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698