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

Side by Side Diff: LayoutTests/http/tests/security/contentSecurityPolicy/1.1/securitypolicy-reporturi.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
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.reportURIs.length === 0)
7 log('PASS document.securityPolicy.reportURIs has length 0 when no poli cy exists.');
8 else
9 log('FAIL document.securityPolicy.reportURIs has length ' + document.s ecurityPolicy.reportURIs.length + ' when no policy exists.');
10
11 injectPolicy('report-uri http://example.com');
12
13 if (document.securityPolicy.reportURIs.length === 1)
14 log('PASS document.securityPolicy.reportURIs has length 1 when policy exists.');
15 else
16 log('FAIL document.securityPolicy.reportURIs has length ' + document.s ecurityPolicy.reportURIs.length + ' when policy exists.');
17
18 if (document.securityPolicy.reportURIs[0] === "http://example.com/")
19 log('PASS document.securityPolicy.reportURIs[0] is correct.');
20 else
21 log('FAIL document.securityPolicy.reportURIs[0] is ' + document.securi tyPolicy.reportURIs[0] + ' (should be `http://example.com/`).');
22 </script>
23 </body>
24 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698