1 <div id=
"description">This tests insertion before/after links. Text should always be inserted at the start or end of a link should be inserted outside of it.
</div>
2 <div id=
"edit" contenteditable=
"true"><a id=
"link" href=
"http://www.google.com/">this should
</a> <a href=
"http://www.google.com/">this should
</a></div>
7 window
.testRunner
.dumpAsText();
9 var edit
= document
.getElementById("edit");
10 var sel
= window
.getSelection();
12 sel
.collapse(edit
, 0);
14 document
.execCommand("InsertText", false, "this text should not be in a link");
15 sel
.modify("move", "forward", "word");
16 sel
.modify("move", "forward", "word");
18 document
.execCommand("InsertText", false, "this should not");
20 sel
.modify("move", "forward", "paragraphBoundary");
22 document
.execCommand("InsertText", false, "this should not");
24 if (window
.testRunner
)
25 document
.body
.innerText
= document
.getElementById("description").innerText
+ "\n\n" + edit
.innerHTML
;