| <html contenteditable="true" id="test"> |
| <script> |
| if (window.testRunner) |
| testRunner.dumpEditingCallbacks(); |
| </script> |
| <script> |
| function runTest() { |
| var s = window.getSelection(); |
| var e = document.getElementById("test"); |
| |
| e.focus(); |
| document.execCommand("InsertText", false, "\t"); |
| document.execCommand("InsertText", false, "This tests to see where the selection is set when an html element is focused."); |
| document.execCommand("InsertHTML", false, "<br>We set it inside the body because we don't want to allow editing outside the body.<br>This test also does some editing to make sure it happens in the body."); |
| |
| document.querySelectorAll('script').forEach((script) => script.remove()); |
| } |
| onload = runTest; |
| </script> |
| <script src="../../resources/dump-as-markup.js"></script> |
| <body> |
| </body> |
| </html> |