6 testRunner
.dumpAsText();
8 var localImageLocation
= "file:///tmp/LayoutTests/http/tests/security/resources/compass.jpg";
10 localImageLocation
= testRunner
.pathToLocalResource(localImageLocation
);
12 var localImageElement
= document
.createElement("img");
13 localImageElement
.setAttribute("id", "myImg");
14 localImageElement
.setAttribute("src", localImageLocation
);
16 function imageTest() {
17 document
.body
.appendChild(localImageElement
);
19 var result
= document
.getElementById("result");
20 var myImg
= document
.getElementById("myImg");
22 if (myImg
.height
== 0 && myImg
.width
== 0)
23 result
.innerHTML
= "Test Passed. Local image not loaded remotely.";
25 result
.innerHTML
= "Test Failed: Local image loaded remotely.";
30 <body onLoad=
"imageTest()">
32 This test is to see if a remote file can include a local image.
34 Currently this test cannot be run manually on Windows because we do not have
35 a function like pathToLocalResource() outside of DRT.