blob: 6bd00cdc967687b45ad05f6c1d10384126fab318 [file] [log] [blame]
Test if WebKit removes grammar markers when we edit a grammatically-incorrect word. To test manually, type a grammatically-incorrect sentence "You has the right." and type a backspace key to delete the last character of "has". This test succeeds when "ha" does not have grammar markers.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
document.execCommand("InsertText", false, "You has the right.")
PASS internals.hasGrammarMarker(document, 4, 3) is true
Delete the end of this sentence until it becomes "You ha".
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
testRunner.execCommand("DeleteBackward")
PASS internals.hasGrammarMarker(document, 4, 2) is false
PASS successfullyParsed is true
TEST COMPLETE
You ha