OLD | NEW |
| (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> | |
OLD | NEW |