1 <script src=
"../../resources/get-host-info.js"></script>
2 <script src=
"test-helpers.js?pipe=sub"></script>
4 var image_path
= base_path() + 'fetch-access-control.php?PNGIMAGE';
5 var host_info
= get_host_info();
9 var img
= document
.createElement('img');
10 document
.body
.appendChild(img
);
11 img
.onload = function() {
14 img
.onerror = function() {
18 img
.src
= './dummy?url=' +
19 encodeURIComponent(host_info
['HTTPS_ORIGIN'] + image_path
);
23 var img
= document
.createElement('img');
24 document
.body
.appendChild(img
);
25 img
.onload = function() {
28 img
.onerror = function() {
32 img
.src
= './dummy?mode=no-cors&url=' +
33 encodeURIComponent(host_info
['HTTPS_REMOTE_ORIGIN'] + image_path
);
37 var img
= document
.createElement('img');
38 document
.body
.appendChild(img
);
39 img
.onload = function() {
43 img
.onerror = function() {
46 img
.src
= './dummy?mode=no-cors&url=' +
47 encodeURIComponent(host_info
['HTTP_ORIGIN'] + image_path
);
51 var img
= document
.createElement('img');
52 document
.body
.appendChild(img
);
53 img
.onload = function() {
57 img
.onerror = function() {
60 img
.src
= './dummy?mode=no-cors&url=' +
61 encodeURIComponent(host_info
['HTTP_REMOTE_ORIGIN'] + image_path
);
66 window
.parent
.postMessage({results
: results
}, host_info
['HTTPS_ORIGIN']);
70 <body onload='test1();'
>