Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(33)

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/script-tests/spellcheck-paste.js

Issue 2270293003: Add a switch to TestRunner to enable/disable mock spell checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use in-class initialization Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698