<script>
if (window.testRunner)
     testRunner.dumpEditingCallbacks();
</script>
<body>
<p>This tests for a bug where attachments dragged into Mail documents blew all content after the position being pasted into.  You should see "Hello[black box] World!" below.</p>
<div id="test" contenteditable="true">Hello World!</div>
</body>

<script>
if (window.internals)
    internals.settings.setEditingBehavior('mac');
var s = window.getSelection();
s.setPosition(document.getElementById("test"), 0);

s.modify("move", "forward", "word");

document.execCommand("InsertHTML", false, "<object style='border: 1px solid #aaa;'></object>");
</script>
