blob: 0d8f52339361a5a7f43ecea4dcf5c26691575303 [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 language="JavaScript" type="text/JavaScript" ></script>
<script>
function editingTest() {
moveSelectionForwardByLineCommand();
extendSelectionForwardByLineCommand();
cutCommand();
deleteCommand();
moveSelectionBackwardByLineCommand();
moveSelectionForwardByCharacterCommand();
moveSelectionForwardByCharacterCommand();
pasteCommand();
}
</script>
<title>Editing Test</title>
</head>
<body>
<div class="explanation">
<div class="scenario">
Tests:
<br>
Pasting text which gets its style from an &lt;H1&gt; tag into a block of styled text.
</div>
<div class="expected-results">
Expected Results:
<br>
Should see this content in the red box below: <span style="font-family: Lucida Grande; color: red">ab<span style="color: black; font-family: serif; font-size: 32px; font-weight: bold">cde</span>fg</span>
</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">
<span style="font-family: Lucida Grande; color: red">abfg</span>
</div>
<h1>
cde
</div>
</div>
<script>
runEditingTest();
</script>
</body>
</html>