| <script> | |
| if (window.testRunner) { | |
| testRunner.dumpAsText(); | |
| testRunner.waitUntilDone(); | |
| } | |
| function pass() { | |
| document.getElementById('result').textContent = 'PASS'; | |
| if (window.testRunner) | |
| testRunner.notifyDone(); | |
| } | |
| </script> | |
| <p>This test ensures that setting the srcdoc attribute iframe causes the | |
| document to change to the current value of the srcdoc attribute on the | |
| iframe.</p> | |
| <div id="result">Waiting...</div> | |
| <iframe srcdoc=" | |
| <script> | |
| window.frameElement.srcdoc = '<script>top.pass();<\/script>'; | |
| </script> | |
| "></iframe> |