blob: 729bcc0870d5d19e0a5411550494de2856ee0fed [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../../../resources/js-test-pre.js"></script>
</head>
<body>
<p id="description">This test checks that markers are correct when auto correcting in the blockquote. If you type "l" and " ", there should be blue dots under the word: "notational". This test also makes sure that the replacement does not cause breaking out of blockquotes.</p>
<div id="console"></div>
<div id = "test" contentEditable="true" spellCheck="true"><blockquote type="cite"><font style = "font-family:Arial"><br> would this <b id = "bold"><br></b><b><br></b>make a difference?<span><br></span><span><br></span></font></blockquote></div>
<script language="javascript">
// Insert some text with a typographical error in it, so autocorrection occurs.
window.getSelection().setPosition(document.getElementById("bold"), 1);
document.execCommand("InsertText", false, "test notation");
eventSender.keyDown('l');
eventSender.keyDown(' ');
if(window.internals) {
shouldBeTrue('internals.hasAutocorrectedMarker(5, 10)');
shouldBe('document.querySelectorAll("blockquote").length', '1');
shouldBe('document.querySelector("blockquote").innerText.indexOf("notational")', '18');
}
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
</html>