blob: 109b5c8f67355f2c8381ff3bc7dd58ec6b1bd8d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
<html>
<head>
<script src="../../fast/js/resources/js-test-pre.js"></script>
<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() {
if (window.testRunner)
testRunner.dumpAsText();
document.getElementById("root").focus();
document.execCommand("InsertText", false, "I have a issue.");
if (window.internals) {
shouldBecomeEqual('internals.hasGrammarMarker(document, 7, 1)', 'true', function() {
document.getElementById("root").style.display = "none";
finishJSTest();
});
}
}
</script>
<title>Editing Test</title>
</head>
<body>
<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="../../fast/js/resources/js-test-post.js"></script>
</body>
</html>
|