blob: bba7f54f7e4358fe4b8381ea7ef45f881d200b8a [file] [log] [blame]
<html>
<head>
<style>
.editing {
border: 2px solid red;
padding: 12px;
font-size: 24px;
}
</style>
<script src=../editing.js language="JavaScript" type="text/JavaScript" ></script>
<script>
function moveNSpacesAndType(n) {
for (i = 0; i < n; i++) {
moveSelectionForwardByCharacterCommand();
}
for (i = 0; i < 3; i++) {
typeCharacterCommand();
}
}
function editingTest() {
moveNSpacesAndType(2);
moveNSpacesAndType(3);
moveNSpacesAndType(1);
moveNSpacesAndType(3);
moveNSpacesAndType(1);
moveNSpacesAndType(1);
moveNSpacesAndType(1);
moveNSpacesAndType(3);
}
</script>
<title>Editing Test</title>
</head>
<body>
<div contenteditable id="root" class="editing">
<span id="test">XX<br>XX<br><br>XX<br><br><br><br>XX</span>
</div>
<script>
runEditingTest();
</script>
</body>
</html>