Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / security / local-iFrame-from-remote.html
blobe8c82086a31527649b5a13213c94949070dffc8b
1 <html>
2 <head>
3 <script>
4 if (window.testRunner)
5 testRunner.dumpAsText();
7 var localPageLocation = "file:///tmp/LayoutTests/http/tests/security/resources/localPage.html";
8 if (window.testRunner)
9 localPageLocation = testRunner.pathToLocalResource(localPageLocation);
11 var localIframeElement = document.createElement("iFrame");
12 localIframeElement.setAttribute("id", "myFrame");
13 localIframeElement.setAttribute("src", localPageLocation);
15 function iFrameTest() {
16 document.body.appendChild(localIframeElement);
18 var result = document.getElementById("result");
19 var myFrameDocument = document.getElementById("myFrame").contentDocument;
20 if (myFrameDocument !== null)
21 result.innerHTML = "Test Failed: Local page remotely loaded into iFrame.";
22 else
23 result.innerHTML = "Test Passed. Local page not remotely loaded into iFrame.";
25 </script>
26 </head>
27 <body onload="iFrameTest()">
28 <div id="div0">
29 This test is to see if a remote file can include a local page in an iFrame.
30 <br/>
31 Currently this test cannot be run manually on Windows because we do not have
32 a function like pathToLocalResource() outside of DRT.
33 <br/>
34 </div>
35 </br>
36 <div id="result">
37 Test not run correctly.
38 </div>
39 </body>
40 </html>