blob: 7e613f7a09d4e600bf47036a67347c41b4a6249d [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var localImageLocation = "file:///tmp/LayoutTests/http/tests/security/resources/compass.jpg";
if (window.testRunner)
localImageLocation = testRunner.pathToLocalResource(localImageLocation);
var localImageElement = document.createElement("img");
localImageElement.setAttribute("id", "myImg");
localImageElement.setAttribute("src", localImageLocation);
localImageElement.setAttribute("onError", "imgError()");
localImageElement.setAttribute("onLoad", "imgLoad()");
function imgError() {
var result = document.getElementById("result");
result.innerHTML = "Test Failed: Image Load Error.";
}
function imgLoad() {
var result = document.getElementById("result");
result.innerHTML = "Test Passed. Local image loaded.";
}
</script>
</head>
<body onload="document.body.appendChild(localImageElement)">
<div id="div0">
This test is to see if a remote file can include a local image.
<br/>
Currently this test cannot be run manually on Windows because we do not have
a function like pathToLocalResource() outside of DRT.
<br/>
</div>
</br>
<div id="result">
Test has not run.
</div>
</br>
</body>
</html>