Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / dom / iframe-document.html
blob0c3f7036579f3f7d8a60e36ae0eb78cd64cbdea0
1 <script>
2 function test()
4 if (window.testRunner)
5 testRunner.dumpAsText();
6 var result;
7 if (!document.getElementById('frame').document)
8 result = "TEST PASSED: The frame has no document property.";
9 else if (document == document.getElementById('frame').document)
10 result = "TEST FAILED: The document property is returning the document the iframe element is in.";
11 else
12 result = "TEST FAILED: The document property is returning a document other than the one the iframe element is in, probably the document inside the frame.";
13 var resultElement = document.getElementById('result');
14 resultElement.replaceChild(document.createTextNode(result), resultElement.firstChild);
16 </script>
17 <body onload="test()">
18 <p>This tests the document property on an HTMLIFrameElement.
19 Internet Explorer has a document property on all elements that gives the document the element is in.
20 Old versions of Safari had both this and another property on iframe elements to return the document
21 inside the iframe, which created an incompatibility with at least on SAP application because it
22 doesn't match the behavior of other browsers.</p>
23 <p id="result">TEST NOT RUN</p>
24 <iframe src="data:text/html,iframe contents" id="frame"></iframe>
25 </body>