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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spelling-huge-text.html

Issue 2235643002: Code cleanup related to unified text checker (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@EnableUnifiedTextCheckerByDefault
Patch Set: Rebased on removal of grammar-checking code Created 4 years, 4 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 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <body onload="test();"> 6 <body onload="test();">
7 <div id="console"></div> 7 <div id="console"></div>
8 <div id="editable" contenteditable></div> 8 <div id="editable" contenteditable></div>
9 9
10 <script> 10 <script>
(...skipping 20 matching lines...) Expand all
31 testLongText += longText; 31 testLongText += longText;
32 32
33 testLongText = "zz zz zz. " + testLongText + " zz zz zz."; 33 testLongText = "zz zz zz. " + testLongText + " zz zz zz.";
34 testEditable.innerText = testLongText; 34 testEditable.innerText = testLongText;
35 35
36 if (!window.internals) { 36 if (!window.internals) {
37 log("Test manually. See the description for steps"); 37 log("Test manually. See the description for steps");
38 return; 38 return;
39 } 39 }
40 40
41 internals.settings.setUnifiedTextCheckerEnabled(true);
42
43 internals.setContinuousSpellCheckingEnabled(false); 41 internals.setContinuousSpellCheckingEnabled(false);
44 testEditable.focus(); 42 testEditable.focus();
45 internals.setContinuousSpellCheckingEnabled(true); 43 internals.setContinuousSpellCheckingEnabled(true);
46 shouldBecomeEqual('internals.markerCountForNode(testEditable.childNodes[0], "spelling")', '6', function() { 44 shouldBecomeEqual('internals.markerCountForNode(testEditable.childNodes[0], "spelling")', '6', function() {
47 testEditable.removeChild(testEditable.childNodes[0]); 45 testEditable.removeChild(testEditable.childNodes[0]);
48 finishJSTest(); 46 finishJSTest();
49 }, 5000 /* huge text needs more time to be spell checked */); 47 }, 5000 /* huge text needs more time to be spell checked */);
50 } 48 }
51 </script> 49 </script>
52 </body> 50 </body>
53 </html> 51 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698