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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/design-mode-spellcheck-off.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 <body spellcheck="false"> 3 <body spellcheck="false">
4 <script src="../editing.js"></script> 4 <script src="../editing.js"></script>
5 <script src="../../resources/js-test.js"></script> 5 <script src="../../resources/js-test.js"></script>
6 <div id="misspelled" onmouseup="checkSpellingMarker()">asd is misspelled.</div> 6 <div id="misspelled" onmouseup="checkSpellingMarker()">asd is misspelled.</div>
7 <script> 7 <script>
8 description("This tests whether WebKit does not spell check in 'designMode' " 8 description("This tests whether WebKit does not spell check in 'designMode' "
9 + "when spellcheck='false'. To test manually, click 'asd' and move cursor un til '.'. " 9 + "when spellcheck='false'. To test manually, click 'asd' and move cursor un til '.'. "
10 + "There should be no spelling marker for 'asd'."); 10 + "There should be no spelling marker for 'asd'.");
11 11
12 jsTestIsAsync = true; 12 jsTestIsAsync = true;
13 13
14 if (window.internals)
15 internals.settings.setUnifiedTextCheckerEnabled(true);
16
17 document.designMode = "on"; 14 document.designMode = "on";
18 15
19 function checkSpellingMarker() 16 function checkSpellingMarker()
20 { 17 {
21 if (!window.internals) 18 if (!window.internals)
22 return; 19 return;
23 20
24 // First, verify spelling with spellcheck attribute off. 21 // First, verify spelling with spellcheck attribute off.
25 // Move selection to the next word to notify WebKit that "asd" has been type d/changed 22 // Move selection to the next word to notify WebKit that "asd" has been type d/changed
26 // to give a chance to spellcheck. 23 // to give a chance to spellcheck.
(...skipping 11 matching lines...) Expand all
38 var misspelledDiv = document.getElementById("misspelled"); 35 var misspelledDiv = document.getElementById("misspelled");
39 var x = misspelledDiv.offsetLeft; 36 var x = misspelledDiv.offsetLeft;
40 var y = misspelledDiv.offsetTop; 37 var y = misspelledDiv.offsetTop;
41 eventSender.mouseMoveTo(x, y); 38 eventSender.mouseMoveTo(x, y);
42 eventSender.mouseDown(); 39 eventSender.mouseDown();
43 eventSender.mouseUp(); 40 eventSender.mouseUp();
44 } 41 }
45 </script> 42 </script>
46 </body> 43 </body>
47 </html> 44 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698