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

Side by Side Diff: third_party/WebKit/LayoutTests/editing/spelling/design-mode-spellcheck-off.html

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, 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 if (window.testRunner)
14 testRunner.setMockSpellCheckerEnabled(true);
13 15
14 document.designMode = "on"; 16 document.designMode = "on";
15 17
16 function checkSpellingMarker() 18 function checkSpellingMarker()
17 { 19 {
18 if (!window.internals) 20 if (!window.internals)
19 return; 21 return;
20 22
21 // First, verify spelling with spellcheck attribute off. 23 // First, verify spelling with spellcheck attribute off.
22 // Move selection to the next word to notify WebKit that "asd" has been type d/changed 24 // Move selection to the next word to notify WebKit that "asd" has been type d/changed
(...skipping 12 matching lines...) Expand all
35 var misspelledDiv = document.getElementById("misspelled"); 37 var misspelledDiv = document.getElementById("misspelled");
36 var x = misspelledDiv.offsetLeft; 38 var x = misspelledDiv.offsetLeft;
37 var y = misspelledDiv.offsetTop; 39 var y = misspelledDiv.offsetTop;
38 eventSender.mouseMoveTo(x, y); 40 eventSender.mouseMoveTo(x, y);
39 eventSender.mouseDown(); 41 eventSender.mouseDown();
40 eventSender.mouseUp(); 42 eventSender.mouseUp();
41 } 43 }
42 </script> 44 </script>
43 </body> 45 </body>
44 </html> 46 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698