blob: 1894dbfa32cd3ec755309433c8eb7b00a815893e [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 editingTest() {
typeCharacterCommand('t');
typeCharacterCommand('h');
typeCharacterCommand('e');
typeCharacterCommand(' ');
typeCharacterCommand('n');
typeCharacterCommand('o');
typeCharacterCommand('t');
typeCharacterCommand('a');
typeCharacterCommand('t');
typeCharacterCommand('i');
typeCharacterCommand('o');
typeCharacterCommand('n');
typeCharacterCommand('l');
typeCharacterCommand(' ');
var toBePasted = "<div>bar</div>baz<br class='Apple-interchange-newline'>";
document.execCommand("InsertHTML", false, toBePasted);
}
</script>
<title>Autocorrection Simple Test</title>
</head>
<body>
<div>This test verifies the removal of autocorrection underline upon pasting in HTML fragment that contains paragraph separator. You should see phrase 'the notational' without blue underline.</div>
<p style="color:green">Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'notational' as the correct spelling of 'notationl' several times, the spell checker will not provide 'notational' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.</p>
<div contenteditable id="root" class="editing">
<span id="test"></span>
</div>
<script>
runEditingTest();
</script>
</body>
</html>