3 testRunner
.dumpEditingCallbacks();
7 var li
= document
.createElement("li");
8 li
.appendChild(document
.createTextNode(str
));
9 var console
= document
.getElementById("console");
10 console
.appendChild(li
);
12 function shouldBe(expected
, actual
) {
13 if (expected
!= actual
)
14 log("Failure. Expected: " + expected
+ ", Actual: " + actual
);
20 <p>This tests Copy/Paste of a input field.
</p>
21 <div id=
"div" contenteditable=
"true"><input type=
"text"></div>
22 <ul id=
"console"></ul>
24 var div
= document
.getElementById("div");
26 document
.execCommand("SelectAll");
28 document
.execCommand("Copy");
29 var sel
= window
.getSelection();
30 sel
.modify("move", "forward", "character");
31 document
.execCommand("Paste");
33 shouldBe(document
.getElementsByTagName("input").length
, 2);