| <html> |
| <head> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpAsText(); |
| |
| var localPageLocation = "file:///tmp/LayoutTests/http/tests/security/resources/localPage.html"; |
| if (window.testRunner) |
| localPageLocation = testRunner.pathToLocalResource(localPageLocation); |
| |
| var localIframeElement = document.createElement("iFrame"); |
| localIframeElement.setAttribute("id", "myFrame"); |
| localIframeElement.setAttribute("src", localPageLocation); |
| |
| function iFrameTest() { |
| document.body.appendChild(localIframeElement); |
| |
| var result = document.getElementById("result"); |
| var myFrameDocument = document.getElementById("myFrame").contentDocument; |
| if (myFrameDocument !== null) |
| result.innerHTML = "Test Failed: Local page remotely loaded into iFrame."; |
| else |
| result.innerHTML = "Test Passed. Local page not remotely loaded into iFrame."; |
| } |
| </script> |
| </head> |
| <body onload="iFrameTest()"> |
| <div id="div0"> |
| This test is to see if a remote 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> |