OLD | NEW |
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 Loading... |
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> |
OLD | NEW |