OLD | NEW |
1 | 1 |
2 description('For Bug 40092: Spell checking for pasted text.'); | 2 description('For Bug 40092: Spell checking for pasted text.'); |
3 | 3 |
4 jsTestIsAsync = true; | 4 jsTestIsAsync = true; |
| 5 if (window.testRunner) |
| 6 testRunner.setMockSpellCheckerEnabled(true); |
5 | 7 |
6 var testRoot = document.createElement("div"); | 8 var testRoot = document.createElement("div"); |
7 document.body.insertBefore(testRoot, document.body.firstChild); | 9 document.body.insertBefore(testRoot, document.body.firstChild); |
8 | 10 |
9 var testTextArea = document.createElement("textarea"); | 11 var testTextArea = document.createElement("textarea"); |
10 testRoot.appendChild(testTextArea); | 12 testRoot.appendChild(testTextArea); |
11 | 13 |
12 var testInput = document.createElement("input"); | 14 var testInput = document.createElement("input"); |
13 testInput.setAttribute("type", "text"); | 15 testInput.setAttribute("type", "text"); |
14 testRoot.appendChild(testInput); | 16 testRoot.appendChild(testInput); |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [[0, 2]]);
}); | 93 tests.push(function() { pasteAndVerify(testSourcePlain, testTextArea, [[0, 2]]);
}); |
92 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [[0, 2
]]); }); | 94 tests.push(function() { pasteAndVerify(testSourceDecorated, testTextArea, [[0, 2
]]); }); |
93 tests.push(function() { pasteAndVerify(testSourceMulti, testTextArea, [[0, 2], [
3, 2]]); }); | 95 tests.push(function() { pasteAndVerify(testSourceMulti, testTextArea, [[0, 2], [
3, 2]]); }); |
94 | 96 |
95 tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [[0, 2]]);
}); | 97 tests.push(function() { pasteAndVerify(testSourcePlain, testEditable, [[0, 2]]);
}); |
96 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [[0, 1
]]); }); // To check "fo" part of foo. | 98 tests.push(function() { pasteAndVerify(testSourceDecorated, testEditable, [[0, 1
]]); }); // To check "fo" part of foo. |
97 tests.push(function() { pasteAndVerify(testSourceMulti, testEditable, [[0, 2], [
3, 2]]); }); | 99 tests.push(function() { pasteAndVerify(testSourceMulti, testEditable, [[0, 2], [
3, 2]]); }); |
98 done(); | 100 done(); |
99 | 101 |
100 var successfullyParsed = true; | 102 var successfullyParsed = true; |
OLD | NEW |