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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/mixedContent/strict-mode-image-no-policy.https.html

Issue 2002003002: Generate CSP violation reports for 'block-all-mixed-content' (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: PHP Created 4 years, 7 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
(Empty)
1 <!doctype html>
2 <script src="/resources/testharness.js"></script>
3 <script src="/resources/testharnessreport.js"></script>
4 <body>
5 <script>
6 async_test(t => {
7 var i = document.createElement('img');
8 i.onerror = t.assert_unreached;
9 i.onload = t.step_func_done(_ => {
10 assert_equals(128, i.naturalWidth);
11 assert_equals(128, i.naturalHeight);
12 });
13 i.src = "http://127.0.0.1:8080/security/resources/compass.jpg?t=1";
14 }, "Mixed images are allowed in the presence of 'block-all-mixed-content' in report-only mode.");
15
16 async_test(t => {
17 var i = document.createElement('img');
18 i.onload = t.step_func_done();
19 document.addEventListener('securitypolicyviolation', t.assert_unreached) ;
20 i.src = "http://127.0.0.1:8080/security/resources/compass.jpg?t=2";
21 }, "Mixed images do not generate CSP violation reports when no policy is pre sent.");
22 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698