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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/resources/fetch-mixed-content-iframe-inscope-to-outscope.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, 6 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 <script src="../../resources/get-host-info.js?pipe=sub"></script> 1 <script src="../../resources/get-host-info.js?pipe=sub"></script>
2 <script src="test-helpers.js"></script> 2 <script src="test-helpers.js"></script>
3 <script> 3 <script>
4 var image_path = base_path() + 'fetch-access-control.php?PNGIMAGE'; 4 var image_path = base_path() + 'fetch-access-control.php?PNGIMAGE';
5 var host_info = get_host_info(); 5 var host_info = get_host_info();
6 var results = ''; 6 var results = '';
7 7
8 function test1() { 8 function test1() {
9 var img = document.createElement('img'); 9 var img = document.createElement('img');
10 document.body.appendChild(img); 10 document.body.appendChild(img);
(...skipping 23 matching lines...) Expand all
34 function test3() { 34 function test3() {
35 var img = document.createElement('img'); 35 var img = document.createElement('img');
36 document.body.appendChild(img); 36 document.body.appendChild(img);
37 img.onload = function() { 37 img.onload = function() {
38 results += 'FAIL(3)'; 38 results += 'FAIL(3)';
39 test4(); 39 test4();
40 }; 40 };
41 img.onerror = function() { 41 img.onerror = function() {
42 test4(); 42 test4();
43 }; 43 };
44 img.src = host_info['HTTP_ORIGIN'] + image_path; 44 img.src = host_info['UNAUTHENTICATED_ORIGIN'] + image_path;
45 } 45 }
46 46
47 function test4() { 47 function test4() {
48 var img = document.createElement('img'); 48 var img = document.createElement('img');
49 document.body.appendChild(img); 49 document.body.appendChild(img);
50 img.onload = function() { 50 img.onload = function() {
51 results += 'FAIL(4)';
52 test5();
53 };
54 img.onerror = function() {
55 test5();
56 };
57 img.src = host_info['HTTP_REMOTE_ORIGIN'] + image_path;
58 }
59
60 function test5() {
61 var img = document.createElement('img');
62 document.body.appendChild(img);
63 img.onload = function() {
64 finish(); 51 finish();
65 }; 52 };
66 img.onerror = function() { 53 img.onerror = function() {
67 results += 'FAIL(5)'; 54 results += 'FAIL(4)';
68 finish(); 55 finish();
69 }; 56 };
70 img.src = './dummy?generate-png'; 57 img.src = './dummy?generate-png';
71 } 58 }
72 59
73 function finish() { 60 function finish() {
74 results += 'finish'; 61 results += 'finish';
75 window.parent.postMessage({results: results}, host_info['HTTPS_ORIGIN']); 62 window.parent.postMessage({results: results}, host_info['HTTPS_ORIGIN']);
76 } 63 }
77 </script> 64 </script>
78 65
79 <body onload='test1();'> 66 <body onload='test1();'>
80 </body> 67 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698