| <!DOCTYPE html> |
| <script src="../../../resources/js-test-pre.js"></script> |
| <iframe id="iframe" seamless srcdoc="FAIL"></iframe> |
| <script> |
| debug("Test that being a seamless iframe does not break designMode.") |
| window.onload = function () { |
| window.iframe = document.getElementById("iframe"); |
| window.iframe.contentDocument.designMode = "on"; |
| var target = window.iframe.contentDocument.body; |
| target.focus(); |
| window.iframe.contentDocument.getSelection().selectAllChildren(target); |
| if (window.eventSender) { |
| eventSender.keyDown("P"); |
| eventSender.keyDown("A"); |
| eventSender.keyDown("S"); |
| eventSender.keyDown("S"); |
| } |
| shouldBeEqualToString("window.iframe.contentDocument.body.textContent", "PASS"); |
| } |
| </script> |