| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script> | 3 <script> |
| 4 if (window.testRunner) | 4 if (window.testRunner) |
| 5 testRunner.dumpAsText(); | 5 testRunner.dumpAsText(); |
| 6 | 6 |
| 7 var localPageLocation = "file:///tmp/LayoutTests/http/tests/security/res
ources/localPage.html"; | 7 var localPageLocation = "file:///tmp/LayoutTests/http/tests/security/res
ources/localPage.html"; |
| 8 if (window.testRunner) | 8 if (window.testRunner) |
| 9 localPageLocation = testRunner.pathToLocalResource(localPageLocation
); | 9 localPageLocation = testRunner.pathToLocalResource(localPageLocation
); |
| 10 | 10 |
| 11 var localIframeElement = document.createElement("iFrame"); | 11 var localIframeElement = document.createElement("iFrame"); |
| 12 localIframeElement.setAttribute("id", "myFrame"); | 12 localIframeElement.setAttribute("id", "myFrame"); |
| 13 localIframeElement.setAttribute("src", localPageLocation); | 13 localIframeElement.setAttribute("src", localPageLocation); |
| 14 | 14 |
| 15 function iFrameTest() { | 15 function iFrameTest() { |
| 16 document.body.appendChild(localIframeElement); | 16 document.body.appendChild(localIframeElement); |
| 17 | 17 |
| 18 var result = document.getElementById("result"); | 18 var result = document.getElementById("result"); |
| 19 var myFrameDocument = document.getElementById("myFrame").contentDocu
ment; | 19 var frameWindow = document.getElementById("myFrame").contentWindow; |
| 20 if (myFrameDocument !== null) | 20 if (frameWindow && frameWindow.location != "about:blank") |
| 21 result.innerHTML = "Test Failed: Local page remotely loaded into
iFrame."; | 21 result.innerHTML = "Test Failed: Local page remotely loaded into
iFrame."; |
| 22 else | 22 else |
| 23 result.innerHTML = "Test Passed. Local page not remotely loaded
into iFrame."; | 23 result.innerHTML = "Test Passed. Local page not remotely loaded
into iFrame."; |
| 24 } | 24 } |
| 25 </script> | 25 </script> |
| 26 </head> | 26 </head> |
| 27 <body onload="iFrameTest()"> | 27 <body onload="iFrameTest()"> |
| 28 <div id="div0"> | 28 <div id="div0"> |
| 29 This test is to see if a remote file can include a local page in an iFra
me. | 29 This test is to see if a remote file can include a local page in an iFra
me. |
| 30 <br/> | 30 <br/> |
| 31 Currently this test cannot be run manually on Windows because we do not
have | 31 Currently this test cannot be run manually on Windows because we do not
have |
| 32 a function like pathToLocalResource() outside of DRT. | 32 a function like pathToLocalResource() outside of DRT. |
| 33 <br/> | 33 <br/> |
| 34 </div> | 34 </div> |
| 35 </br> | 35 </br> |
| 36 <div id="result"> | 36 <div id="result"> |
| 37 Test not run correctly. | 37 Test not run correctly. |
| 38 </div> | 38 </div> |
| 39 </body> | 39 </body> |
| 40 </html> | 40 </html> |
| OLD | NEW |