blob: b636c33565564ae9f013d0bae8ab305543d3ffd3 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
internals.settings.setSmartInsertDeleteEnabled(false);
internals.settings.setSelectTrailingWhitespaceEnabled(true);
}
if (window.internals)
internals.settings.setEditingBehavior('windows');
function editingTest() {
var div = document.getElementById("div");
var sel = window.getSelection();
sel.setPosition(div, 0);
sel.modify("move", "forward", "word");
sel.modify("move", "forward", "word");
sel.modify("move", "backward", "character");
sel.modify("extend", "backward", "word");
testRunner.execCommand("DeleteForward");
}
</script>
<title>Editing Test</title>
</head>
<body>
This test verifies that smart insert and delete can be disabled at test time.<br>
If viewing in a browser, you should see the words "foo bar baz".<br>
If using a version of testRunner with this functionality, you should see "foo baz". (two spaces between the words)<br>
If using a version of testRunner without this functionality, you should see "foo baz". (one space between the words)<br>
</div>
</div>
<div contenteditable="true" id="div">
foo bar baz
</div>
<script>
editingTest();
</script>
</body>
</html>