blob: d533a4b86b230cb4c493ae74bb22714f280ea211 [file] [log] [blame]
<html>
<head>
<script>
function iFrameTest() {
if (window.layoutTestController)
layoutTestController.dumpAsText();
var localPageLocation = "file:///tmp/LayoutTests/http/tests/security/resources/localPage.html";
if (window.layoutTestController)
localPageLocation = layoutTestController.pathToLocalResource(localPageLocation);
var localIframeElement = document.createElement("iFrame");
localIframeElement.setAttribute("id", "myFrame");
localIframeElement.setAttribute("src", localPageLocation);
document.body.appendChild(localIframeElement);
var result = document.getElementById("result");
var myFrameDocument = document.getElementById("myFrame").contentDocument;
if (myFrameDocument)
result.innerHTML = "Test Passed. Local page loaded locally into iFrame.";
else
result.innerHTML = "Test Failed: Local page not locally loaded into iFrame.";
}
</script>
</head>
<body onload="iFrameTest()">
<div id="div0">
This test is to see if a local file can include a local page in an iFrame.
<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 not run correctly.
</div>
</body>
</html>