blob: 4a41591fd033d0526a16e3bac4db269043ffc88b [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('win');
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>