OLD | NEW |
1 <html> <head> | 1 <html> <head> |
2 <script> | 2 <script> |
3 function done() { | 3 function done() { |
4 var pageLocation = "filesystem:http://localhost:8000/temporary/page.
html"; | 4 var pageLocation = "filesystem:http://localhost:8000/temporary/page.
html"; |
5 var localIframeElement = document.createElement("iframe"); | 5 var localIframeElement = document.createElement("iframe"); |
6 localIframeElement.setAttribute("id", "myFrame"); | 6 localIframeElement.setAttribute("id", "myFrame"); |
7 localIframeElement.setAttribute("src", pageLocation); | 7 localIframeElement.setAttribute("src", pageLocation); |
8 document.body.appendChild(localIframeElement); | 8 document.body.appendChild(localIframeElement); |
9 | 9 |
10 var result = document.getElementById("result"); | 10 var result = document.getElementById("result"); |
11 var myFrameDocument = document.getElementById("myFrame").contentDocu
ment; | 11 var frameWindow = document.getElementById("myFrame").contentWindow; |
12 if (myFrameDocument) | 12 if (frameWindow && frameWindow.location != "about:blank") |
13 result.innerHTML = "Test Failed: Local page remotely loaded into
iFrame."; | 13 result.innerHTML = "Test Failed: Local page remotely loaded into
iFrame."; |
14 else | 14 else |
15 result.innerHTML = "Test Passed. Local page not remotely loaded
into iFrame."; | 15 result.innerHTML = "Test Passed. Local page not remotely loaded
into iFrame."; |
16 | 16 |
17 if (window.testRunner) | 17 if (window.testRunner) |
18 testRunner.notifyDone(); | 18 testRunner.notifyDone(); |
19 } | 19 } |
20 | 20 |
21 if (window.testRunner) { | 21 if (window.testRunner) { |
22 testRunner.dumpAsText(); | 22 testRunner.dumpAsText(); |
23 testRunner.waitUntilDone(); | 23 testRunner.waitUntilDone(); |
24 } | 24 } |
25 | 25 |
26 // Need to wait for the iframe to do its async work. | 26 // Need to wait for the iframe to do its async work. |
27 window.onmessage = done; | 27 window.onmessage = done; |
28 </script> | 28 </script> |
29 </head> | 29 </head> |
30 <body> | 30 <body> |
31 <div id="div0"> | 31 <div id="div0"> |
32 This test is to see if a remote file can include a local page via a file
system: URI in an iFrame. | 32 This test is to see if a remote file can include a local page via a file
system: URI in an iFrame. |
33 </div> | 33 </div> |
34 <br> | 34 <br> |
35 <div id="result"> | 35 <div id="result"> |
36 Test not run correctly. | 36 Test not run correctly. |
37 </div> | 37 </div> |
38 <iframe src="http://localhost:8000/security/resources/create-filesystem-file
.html"></iframe> | 38 <iframe src="http://localhost:8000/security/resources/create-filesystem-file
.html"></iframe> |
39 </body> | 39 </body> |
40 </html> | 40 </html> |
OLD | NEW |