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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/securitypolicyviolation/securitypolicyviolation-block-image.html

Issue 2331213002: Add `disposition` to SecurityPolicyViolationEvent (Closed)
Patch Set: Fix a typo in rebased test expectation Created 4 years, 2 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <meta http-equiv="Content-Security-Policy" content="img-src 'none'"> 4 <meta http-equiv="Content-Security-Policy" content="img-src 'none'">
5 <script src="/js-test-resources/js-test.js"></script> 5 <script src="/js-test-resources/js-test.js"></script>
6 <script src="../resources/securitypolicyviolation-test.js"></script> 6 <script src="../resources/securitypolicyviolation-test.js"></script>
7 <script> 7 <script>
8 description('Check that a SecurityPolicyViolationEvent is fired upon blo cking an image.'); 8 description('Check that a SecurityPolicyViolationEvent is fired upon blo cking an image.');
9 9
10 var expectations = { 10 var expectations = {
11 'documentURI': document.location.toString(), 11 'documentURI': document.location.toString(),
12 'referrer': document.referrer, 12 'referrer': document.referrer,
13 'blockedURI': 'http://127.0.0.1:8000/security/resources/abe.png', 13 'blockedURI': 'http://127.0.0.1:8000/security/resources/abe.png',
14 'violatedDirective': 'img-src \'none\'', 14 'violatedDirective': 'img-src \'none\'',
15 'effectiveDirective': 'img-src', 15 'effectiveDirective': 'img-src',
16 'originalPolicy': 'img-src \'none\'', 16 'originalPolicy': 'img-src \'none\'',
17 'disposition': 'enforce',
17 'sourceFile': '', 18 'sourceFile': '',
18 'lineNumber': 0, 19 'lineNumber': 0,
19 'columnNumber': 0, 20 'columnNumber': 0,
20 'statusCode': 200, 21 'statusCode': 200,
21 }; 22 };
22 23
23 function run() { 24 function run() {
24 var img = document.createElement('img'); 25 var img = document.createElement('img');
25 img.src = '/security/resources/abe.png'; 26 img.src = '/security/resources/abe.png';
26 document.body.appendChild(img); 27 document.body.appendChild(img);
27 } 28 }
28 </script> 29 </script>
29 </head> 30 </head>
30 <body> 31 <body>
31 </body> 32 </body>
32 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698