blob: 845fee15e4fdb624146d562b48ff3085fc7b3be0 [file] [log] [blame]
<html>
<head>
<style>
.editing {
border: 2px solid red;
}
.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 language="JavaScript" type="text/JavaScript" ></script>
<script>
if (window.internals)
internals.settings.setEditingBehavior('mac');
function editingTest() {
moveSelectionForwardByLineCommand();
boldCommand();
typeCharacterCommand(' ');
typeCharacterCommand('f');
typeCharacterCommand('o');
typeCharacterCommand('u');
typeCharacterCommand('r');
moveSelectionBackwardByLineCommand();
extendSelectionForwardByWordCommand();
copyCommand();
moveSelectionForwardByWordCommand();
moveSelectionForwardByWordCommand();
moveSelectionForwardByWordCommand();
pasteCommand();
}
</script>
<title>Editing Test</title>
</head>
<body>
<div class="explanation">
<div class="scenario">
Tests:
<br>
Pasting at style boundary does not crash or produce empty style span(s).
</div>
<div class="expected-results">
Expected Results:
<br>
Should see this content in the red box below:
<br><div>one two three <b>four</b>one</div>
</div>
</div>
<div contenteditable id="root">
<div id="test" class="editing">one two three</div>
</div>
<script>
runEditingTest();
</script>
</body>
</html>