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 | 12 |
13 function test() | 13 function test() |
14 { | 14 { |
15 jsTestIsAsync = true; | 15 jsTestIsAsync = true; |
16 internals.settings.setUnifiedTextCheckerEnabled(true); | |
17 | 16 |
18 var sel = window.getSelection(); | 17 var sel = window.getSelection(); |
19 var destination = document.getElementById("destination"); | 18 var destination = document.getElementById("destination"); |
20 destination.focus(); | 19 destination.focus(); |
21 document.execCommand("InsertHTML", false, "wellcome"); | 20 document.execCommand("InsertHTML", false, "wellcome"); |
22 document.execCommand("InsertText", false, "."); | 21 document.execCommand("InsertText", false, "."); |
23 | 22 |
24 shouldBecomeEqualToString('internals.markerDescriptionForNode(destination.fi
rstChild, "spelling", 0)', 'welcome', finishJSTest); | 23 shouldBecomeEqualToString('internals.markerDescriptionForNode(destination.fi
rstChild, "spelling", 0)', 'welcome', finishJSTest); |
25 } | 24 } |
26 | 25 |
27 description("The spellchecker should store replacement text in each marker."); | 26 description("The spellchecker should store replacement text in each marker."); |
28 if (window.internals) | 27 if (window.internals) |
29 test(); | 28 test(); |
30 | 29 |
31 </script> | 30 </script> |
32 </body> | 31 </body> |
33 </html> | 32 </html> |
OLD | NEW |