OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src=../../fast/js/resources/js-test-pre.js language="javascript" type="t
ext/javascript"></script> | 3 <script src=../../fast/js/resources/js-test-pre.js language="javascript" type="t
ext/javascript"></script> |
4 <title>Testing moving cursor to a misspelled word</title> | 4 <title>Testing moving cursor to a misspelled word</title> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <div id="src" contenteditable="true" spellcheck="true"></div><br/> | 7 <div id="src" contenteditable="true" spellcheck="true"></div><br/> |
8 <script language="javascript"> | 8 <script language="javascript"> |
9 description('Test if Chrome WebKit does not remove a misspelled marker when movi
ng a cursor on a misspelled word.' + | 9 description('Test if Chrome WebKit does not remove a misspelled marker when movi
ng a cursor on a misspelled word.' + |
10 'To test manually, type a misspelled word "zz " and type a left-arro
w key to move the cursor on it.' + | 10 'To test manually, type a misspelled word "zz " and type a left-arro
w key to move the cursor on it.' + |
11 'This test succeeds when "zz" is marked as misspelled.'); | 11 'This test succeeds when "zz" is marked as misspelled.'); |
12 | 12 |
| 13 jsTestIsAsync = true; |
| 14 |
13 internals.settings.setAsynchronousSpellCheckingEnabled(true); | 15 internals.settings.setAsynchronousSpellCheckingEnabled(true); |
14 var node = document.getElementById('src'); | 16 var node = document.getElementById('src'); |
15 node.focus(); | 17 node.focus(); |
16 document.execCommand("InsertText", false, 'z'); | 18 document.execCommand("InsertText", false, 'z'); |
17 document.execCommand("InsertText", false, 'z'); | 19 document.execCommand("InsertText", false, 'z'); |
18 document.execCommand("InsertText", false, ' '); | 20 document.execCommand("InsertText", false, ' '); |
19 window.getSelection().modify('move', 'backward', 'character'); | 21 window.getSelection().modify('move', 'backward', 'character'); |
20 shouldBeTrue('internals.hasSpellingMarker(document, 0, 2)'); | 22 shouldBecomeEqual('internals.hasSpellingMarker(document, 0, 2)', 'true', finishJ
STest); |
21 </script> | 23 </script> |
22 <script src="../../fast/js/resources/js-test-post.js"></script> | 24 <script src="../../fast/js/resources/js-test-post.js"></script> |
23 </body> | 25 </body> |
24 </html> | 26 </html> |
OLD | NEW |