| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="AutoCorrectTests.js"></script> |
| <script src="../undo/UndoTests.js"></script> |
| <script> |
| function performTest() |
| { |
| Outline_init(); |
| AutoCorrect_init(); |
| PostponedActions_perform(); |
| |
| Cursor_insertCharacter("one"); |
| Cursor_insertCharacter(" twox"); |
| AutoCorrect_correctPrecedingWord(4,"two"); |
| Cursor_insertCharacter(" three"); |
| Cursor_insertCharacter(" fourx"); |
| AutoCorrect_correctPrecedingWord(5,"four"); |
| Cursor_insertCharacter(" five"); |
| Cursor_insertCharacter(" sixx"); |
| AutoCorrect_correctPrecedingWord(4,"six"); |
| Cursor_insertCharacter(" seven"); |
| PostponedActions_perform(); |
| showSelection(); |
| |
| UndoManager_clear(); |
| var versions = new Array(); |
| versions.push(DOM_cloneNode(document.body,true)); |
| for (var i = 0; i < 3; i++) { |
| AutoCorrect_acceptCorrection(); |
| PostponedActions_perform(); |
| versions.push(DOM_cloneNode(document.body,true)); |
| } |
| |
| testUndo(versions,document.body); |
| } |
| </script> |
| </head> |
| <body> |
| <p>[]</p> |
| </body> |
| </html> |