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