| var localImageLocation = "file:///tmp/LayoutTests/http/tests/security/resources/compass.jpg"; |
| localImageLocation = testRunner.pathToLocalResource(localImageLocation); |
| var localImageElement = document.createElement("img"); |
| localImageElement.setAttribute("id", "myImg"); |
| localImageElement.setAttribute("src", localImageLocation); |
| document.body.appendChild(localImageElement); |
| var result = document.getElementById("result"); |
| var myImg = document.getElementById("myImg"); |
| if (myImg.height == 0 && myImg.width == 0) |
| result.innerHTML = "Test Passed. Local image not loaded remotely."; |
| result.innerHTML = "Test Failed: Local image loaded remotely."; |
| <body onLoad="imageTest()"> |
| This test is to see if a remote file can include a local image. |
| Currently this test cannot be run manually on Windows because we do not have |
| a function like pathToLocalResource() outside of DRT. |