blob: f583b6b2985b9cb1d24d1f14cac70016ea38fa51 [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() {
document.getElementById("root").focus();
document.execCommand("InsertText", false, "I have a issue.");
if (window.internals) {
shouldBecomeEqual('internals.hasGrammarMarker(7, 1)', 'true', function() {
document.getElementById("root").style.display = "none";
finishJSTest();
});
}
}
</script>
<title>Editing Test</title>
</head>
<body>
<script src="../../resources/js-test-pre.js"></script>
<div contenteditable id="root" class="editing"></div>
<script>
description("This tests whether the grammatically-incorrect phrase "
+ "'I have a issue' has grammar marker on 'a'.");
jsTestIsAsync = true;
if (window.internals) {
internals.settings.setUnifiedTextCheckerEnabled(true);
internals.settings.setAsynchronousSpellCheckingEnabled(true);
}
editingTest();
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>