Home | History | Annotate | Download | only in autocorrection
      1 <html>
      2 <head>
      3 
      4 <style>
      5 .editing {
      6     border: 2px solid red;
      7     padding: 12px;
      8     font-size: 24px;
      9 }
     10 </style>
     11 <script src=../../../../LayoutTests/editing/editing.js language="JavaScript" type="text/JavaScript" ></script>
     12 
     13 <script>
     14 function editingTest() {
     15     typeCharacterCommand('t');
     16     typeCharacterCommand('h');
     17     typeCharacterCommand('e');
     18     typeCharacterCommand(' ');
     19     typeCharacterCommand('c');
     20     typeCharacterCommand('y');
     21     typeCharacterCommand('l');
     22     typeCharacterCommand('i');
     23     typeCharacterCommand('n');
     24     typeCharacterCommand('d');
     25     typeCharacterCommand('r');
     26 }
     27 
     28 </script>
     29 
     30 <title>Spellchecking After Reversion Test</title>
     31 </head>
     32 <body>
     33 <div><p>This test verifies the behavior of spellchecking after reversion.</p>
     34 <ol>
     35 <li>After seeing the correction panel, press space to accept the correction.</li>
     36 <li>Press delete key to bring up reversion bubble.</li>
     37 <li>Press ESC key to accept the reversion suggestion.</li>
     38 <li>Press space key again, and verify that the word "cylindr" IS NOT marked as misspelled.</li>
     39 <li>Press delete key twice.</li>
     40 <li>Press space key again, and verify that the word "cylind" IS marked as misspelled.</li>
     41 </ol>
     42 <p  style="color:green">Note, this test can fail due to user specific spell checking data. To fix this, remove all files in ~/Library/Spelling.</p>
     43 <div contenteditable id="root" class="editing">
     44 <span id="test"></span>
     45 </div>
     46 
     47 
     48 <script>
     49 runEditingTest();
     50 </script>
     51 
     52 </body>
     53 </html>
     54