OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../resources/js-test.js"></script> | 4 <script src="../../resources/js-test.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <div id="container"> | 7 <div id="container"> |
8 <div id="destination" contentEditable></div> | 8 <div id="destination" contentEditable></div> |
9 </div> | 9 </div> |
10 | 10 |
11 <script> | 11 <script> |
| 12 if (window.testRunner) |
| 13 testRunner.setMockSpellCheckerEnabled(true); |
12 | 14 |
13 function test() | 15 function test() |
14 { | 16 { |
15 jsTestIsAsync = true; | 17 jsTestIsAsync = true; |
16 | 18 |
17 var sel = window.getSelection(); | 19 var sel = window.getSelection(); |
18 var destination = document.getElementById("destination"); | 20 var destination = document.getElementById("destination"); |
19 destination.focus(); | 21 destination.focus(); |
20 document.execCommand("InsertHTML", false, "wellcome"); | 22 document.execCommand("InsertHTML", false, "wellcome"); |
21 document.execCommand("InsertText", false, "."); | 23 document.execCommand("InsertText", false, "."); |
22 | 24 |
23 shouldBecomeEqualToString('internals.markerDescriptionForNode(destination.fi
rstChild, "spelling", 0)', 'welcome', finishJSTest); | 25 shouldBecomeEqualToString('internals.markerDescriptionForNode(destination.fi
rstChild, "spelling", 0)', 'welcome', finishJSTest); |
24 } | 26 } |
25 | 27 |
26 description("The spellchecker should store replacement text in each marker."); | 28 description("The spellchecker should store replacement text in each marker."); |
27 if (window.internals) | 29 if (window.internals) |
28 test(); | 30 test(); |
29 | 31 |
30 </script> | 32 </script> |
31 </body> | 33 </body> |
32 </html> | 34 </html> |
OLD | NEW |