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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-picture-in-main-frame-blocked.https.html

Issue 1931063004: Stop blocking 'http://127.0.0.1/' as mixed content. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Ugh. Created 4 years, 5 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 <body> 3 <body>
4 <picture></picture> 4 <picture></picture>
5 5
6 <script src="/resources/testharness.js"></script> 6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script> 7 <script src="/resources/testharnessreport.js"></script>
8 <script> 8 <script>
9 if (window.testRunner) 9 if (window.testRunner)
10 testRunner.overridePreference("WebKitAllowRunningInsecureContent", false ); 10 testRunner.overridePreference("WebKitAllowRunningInsecureContent", false );
11 11
12 var t = async_test("Testing an insecure image in a <picture> element."); 12 var t = async_test("Testing an insecure image in a <picture> element.");
13 13
14 window.onload = t.step_func(function () { 14 window.onload = t.step_func(function () {
15 var img = document.createElement('img'); 15 var img = document.createElement('img');
16 16
17 img.addEventListener('load', t.step_func(function() { 17 img.addEventListener('load', t.step_func(function() {
18 assert_unreached("The image should not load."); 18 assert_unreached("The image should not load.");
19 t.done(); 19 t.done();
20 })); 20 }));
21 21
22 img.addEventListener('error', t.step_func(function() { 22 img.addEventListener('error', t.step_func(function() {
23 assert_equals(0, img.naturalHeight, "Should have 0 naturalHeight"); 23 assert_equals(0, img.naturalHeight, "Should have 0 naturalHeight");
24 assert_equals(0, img.naturalWidth, "Should have 0 naturalWidth"); 24 assert_equals(0, img.naturalWidth, "Should have 0 naturalWidth");
25 t.done(); 25 t.done();
26 })); 26 }));
27 27
28 document.querySelector('picture').appendChild(img); 28 document.querySelector('picture').appendChild(img);
29 img.src = "http://127.0.0.1:8080/security/resources/compass.jpg"; 29 img.src = "http://example.test:8080/security/resources/compass.jpg";
30 }); 30 });
31 </script> 31 </script>
32 </body> 32 </body>
33 </html> 33 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698