5 testRunner
.dumpAsText();
7 var localImageLocation
= "file:///tmp/LayoutTests/http/tests/security/resources/compass.jpg";
9 localImageLocation
= testRunner
.pathToLocalResource(localImageLocation
);
11 var localImageElement
= document
.createElement("img");
12 localImageElement
.setAttribute("id", "myImg");
13 localImageElement
.setAttribute("src", localImageLocation
);
14 localImageElement
.setAttribute("onError", "imgError()");
15 localImageElement
.setAttribute("onLoad", "imgLoad()");
18 var result
= document
.getElementById("result");
19 result
.innerHTML
= "Test Failed: Image Load Error.";
23 var result
= document
.getElementById("result");
24 result
.innerHTML
= "Test Passed. Local image loaded.";
28 <body onload=
"document.body.appendChild(localImageElement)">
30 This test is to see if a remote file can include a local image.
32 Currently this test cannot be run manually on Windows because we do not have
33 a function like pathToLocalResource() outside of DRT.