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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/violation-line-number-repro.html

Issue 2357323002: Demonstration of edge case where CSP violation reports have incorrect line numbers. (Closed)
Patch Set: Created 4 years, 3 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
« no previous file with comments | « no previous file | no next file » | 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>
2 <html>
3 <head>
4 <meta http-equiv="Content-Security-Policy" content="script-src 'self' 'unsaf e-inline' http://localhost:8000">
5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script>
7 </head>
8 <body>
9 <script>
10 function generateURL(port) {
11 return 'http://localhost:' + port + '/security/contentSecurityPolicy/r esources/loaded.js';
12 }
13
14 document.write("<scr" + "ipt src='" + generateURL("8000") + "'></scr" + "ipt>");
15
16 async_test(function (t) {
17 document.addEventListener("securitypolicyviolation", t.step_func_done( e => { assert_equals(e.lineNumber, 18); }));
18 document.write("<scr" + "ipt src='" + generateURL("8001") + "'></scr" + "ipt>");
19 });
20
21 </script>
22 </body>
23 </html>
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698