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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/spelling-unified-emulation.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 <script src="../editing.js"></script> 5 <script src="../editing.js"></script>
6 <style> 6 <style>
7 .editing { 7 .editing {
8 border: 2px solid red; 8 border: 2px solid red;
9 padding: 6px; 9 padding: 6px;
10 font-size: 18px; 10 font-size: 18px;
11 } 11 }
12 </style> 12 </style>
13 </head> 13 </head>
14 <body> 14 <body>
15 <pre id="description"></pre> 15 <pre id="description"></pre>
16 <pre id="console"></pre> 16 <pre id="console"></pre>
17 <div id="container"></div> 17 <div id="container"></div>
18 18
19 <script> 19 <script>
20 description("The spellchecker should work correctly if unified spellcheck path i s used."); 20 description("The spellchecker should work correctly if unified spellcheck path i s used.");
21 21
22 var container = document.getElementById('container'); 22 var container = document.getElementById('container');
23 function removeChildren(node) { 23 function removeChildren(node) {
24 while (node.firstChild) 24 while (node.firstChild)
25 node.removeChild(node.firstChild); 25 node.removeChild(node.firstChild);
26 } 26 }
27 27
28 if (window.internals)
29 internals.settings.setUnifiedTextCheckerEnabled(true);
30
31 var testData = [ 28 var testData = [
32 { text: 'zz', marked: ['zz'] }, 29 { text: 'zz', marked: ['zz'] },
33 { text: 'apple,zz,orange', marked: ['zz'] }, 30 { text: 'apple,zz,orange', marked: ['zz'] },
34 { text: 'zz,zz', marked: ['zz','zz'] }, 31 { text: 'zz,zz', marked: ['zz','zz'] },
35 { text: 'zz zz zz', marked: ['zz', 'zz', 'zz'] }, 32 { text: 'zz zz zz', marked: ['zz', 'zz', 'zz'] },
36 { text: ' zz zz zz ', marked: ['zz', 'zz', 'zz'] }, 33 { text: ' zz zz zz ', marked: ['zz', 'zz', 'zz'] },
37 { text: 'zz apple orange', marked: ['zz'] }, 34 { text: 'zz apple orange', marked: ['zz'] },
38 { text: 'apple zz orange', marked: ['zz'] }, 35 { text: 'apple zz orange', marked: ['zz'] },
39 { text: 'apple orange zz', marked: ['zz'] }, 36 { text: 'apple orange zz', marked: ['zz'] },
40 { text: 'buzz', marked: [] }, 37 { text: 'buzz', marked: [] },
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 str = range.toString(); 69 str = range.toString();
73 markedStr = data.marked[i]; 70 markedStr = data.marked[i];
74 shouldBe('str', 'markedStr'); 71 shouldBe('str', 'markedStr');
75 } 72 }
76 } 73 }
77 74
78 for (var i = 0; i < testData.length; ++i) { 75 for (var i = 0; i < testData.length; ++i) {
79 performTest('test', testData[i]); 76 performTest('test', testData[i]);
80 } 77 }
81 78
82 if (window.internals)
83 internals.settings.setUnifiedTextCheckerEnabled(false);
84
85 var successfullyParsed = true; 79 var successfullyParsed = true;
86 </script> 80 </script>
87 </body> 81 </body>
88 </html> 82 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698