blob: 382746e2f34bacd35b43cb82996b1dbe78c4e3f5 [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 "two"
if (window.eventSender) {
eventSender.clearKillRing();
eventSender.keyDown("k", ["ctrlKey"]); // two three in the kill ring
eventSender.keyDown("k", ["ctrlKey"]); // newline added to killring
eventSender.keyDown("k", ["ctrlKey"]); // four five six added to kill ring
eventSender.keyDown("k", ["ctrlKey"]); // newline added to killring
eventSender.keyDown("k", ["ctrlKey"]); // seven eight nine added to kill ring
eventSender.keyDown("y", ["ctrlKey"]);
}
}
</script>
<title>Editing Test for ctrl-k and ctrl-y</title>
</head>
<body>
<div class="explanation">
<div class="scenario">
Tests:
<br>
Multiple ctrl-k presses then a ctrl-y.
</div>
<div class="expected-results">
Expected Results:
<br>
<div>
one two three
<div>four five six</div>
<div>seven eight nine</div>
</div>
</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 two three
<div>four five six</div>
<div>seven eight nine</div>
</div>
</div>
<script>
runEditingTest();
</script>
</body>
</html>