1 <script src="test-helpers.js?pipe=sub"></script>
3 var image_path = base_path() + 'fetch-access-control.php?PNGIMAGE';
4 var host_info = get_host_info();
8 var img = document.createElement('img');
9 document.body.appendChild(img);
10 img.onload = function() {
13 img.onerror = function() {
17 img.src = host_info['HTTPS_ORIGIN'] + image_path;
21 var img = document.createElement('img');
22 document.body.appendChild(img);
23 img.onload = function() {
26 img.onerror = function() {
30 img.src = host_info['HTTPS_REMOTE_ORIGIN'] + image_path;
34 var img = document.createElement('img');
35 document.body.appendChild(img);
36 img.onload = function() {
40 img.onerror = function() {
43 img.src = host_info['HTTP_ORIGIN'] + image_path;
47 var img = document.createElement('img');
48 document.body.appendChild(img);
49 img.onload = function() {
53 img.onerror = function() {
56 img.src = host_info['HTTP_REMOTE_ORIGIN'] + image_path;
60 var img = document.createElement('img');
61 document.body.appendChild(img);
62 img.onload = function() {
65 img.onerror = function() {
69 img.src = './dummy?url=' +
70 encodeURIComponent(host_info['HTTPS_ORIGIN'] + image_path);
74 var img = document.createElement('img');
75 document.body.appendChild(img);
76 img.onload = function() {
79 img.onerror = function() {
83 img.src = './dummy?mode=no-cors&url=' +
84 encodeURIComponent(host_info['HTTPS_REMOTE_ORIGIN'] + image_path);
88 var img = document.createElement('img');
89 document.body.appendChild(img);
90 img.onload = function() {
94 img.onerror = function() {
97 img.src = './dummy?mode=no-cors&url=' +
98 encodeURIComponent(host_info['HTTP_ORIGIN'] + image_path);
102 var img = document.createElement('img');
103 document.body.appendChild(img);
104 img.onload = function() {
105 results += 'FAIL(8)';
108 img.onerror = function() {
111 img.src = './dummy?mode=no-cors&url=' +
112 encodeURIComponent(host_info['HTTP_REMOTE_ORIGIN'] + image_path);
117 window.parent.postMessage({results: results}, host_info['HTTPS_ORIGIN']);
121 <body onload='test1();'>