blob: 19c9c4049e7a18be566145185894f879bdc30ca6 [file] [log] [blame]
<html>
<head>
<style>
.editing {
border: 2px solid red;
font-size: 24px;
}
.explanation {
border: 2px solid blue;
padding: 12px;
font-size: 24px;
margin-bottom: 24px;
}
.scenario { margin-bottom: 16px;}
.scenario:first-line { font-weight: bold; margin-bottom: 16px;}
.expected-results:first-line { font-weight: bold }
</style>
<script src='../editing.js'></script>
<script>
function editingTest()
{
moveSelectionForwardByWordCommand(); // cursor after "one"
moveSelectionForwardByWordCommand(); // cursor after "five"
if (window.eventSender) {
eventSender.keyDown("k", ["ctrlKey"]); // two three four in the kill ring
eventSender.keyDown("a", ["ctrlKey"]); // cursor before "one"
}
moveSelectionForwardByWordCommand(); // cursor after "one"
if (window.eventSender)
eventSender.keyDown("y", ["ctrlKey"]);
}
</script>
<title>Editing Test for ctrl-a, ctrl-k, ctrl-y</title>
</head>
<body>
<div class="explanation">
<div class="scenario">
Tests:
<br>
ctrl-a, ctrl-k, and ctrl-y
</div>
<div class="expected-results">
Expected Results:
<br>
<BR>
one two three four five
</div>
</div>
<div contenteditable id="root" style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space;">
<div id="test" class="editing">one five two three four</div>
</div>
<script>
runEditingTest();
</script>
</body>
</html>