| <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); |
| |
| function imageTest() { |
| 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."; |
| else |
| result.innerHTML = "Test Failed: Local image loaded remotely."; |
| } |
| </script> |
| |
| </head> |
| <body onLoad="imageTest()"> |
| <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> |