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

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

Issue 961633002: Mixed Content: Remove redundant pref from tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 10 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 | Annotate | Revision Log
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)
10 testRunner.overridePreference("WebKitAllowRunningInsecureContent", false );
11
12 var t = async_test("Testing an insecure image in a <picture> element."); 9 var t = async_test("Testing an insecure image in a <picture> element.");
13 10
14 window.onload = t.step_func(function () { 11 window.onload = t.step_func(function () {
15 var img = document.createElement('img'); 12 var img = document.createElement('img');
16 13
17 img.addEventListener('load', t.step_func(function() { 14 img.addEventListener('load', t.step_func(function() {
18 assert_unreached("The image should not load."); 15 assert_unreached("The image should not load.");
19 t.done(); 16 t.done();
20 })); 17 }));
21 18
22 img.addEventListener('error', t.step_func(function() { 19 img.addEventListener('error', t.step_func(function() {
23 assert_equals(0, img.naturalHeight, "Should have 0 naturalHeight"); 20 assert_equals(0, img.naturalHeight, "Should have 0 naturalHeight");
24 assert_equals(0, img.naturalWidth, "Should have 0 naturalWidth"); 21 assert_equals(0, img.naturalWidth, "Should have 0 naturalWidth");
25 t.done(); 22 t.done();
26 })); 23 }));
27 24
28 document.querySelector('picture').appendChild(img); 25 document.querySelector('picture').appendChild(img);
29 img.src = "http://127.0.0.1:8080/security/resources/compass.jpg"; 26 img.src = "http://127.0.0.1:8080/security/resources/compass.jpg";
30 }); 27 });
31 </script> 28 </script>
32 </body> 29 </body>
33 </html> 30 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698