Changeset 147994 in webkit


Ignore:
Timestamp:
Apr 9, 2013 12:35:31 AM (11 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION: Autocorrection doesn't work in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=113846

Reviewed by Alexey Proskuryakov.

Tools:

The problem was that we were replacing NSSpellCheck's dictionary with our own
in DumpRenderTree but we were not adding necessary corrections to the dictionary.

Fixed the bug by having NSSpellChecker correct "mesage" and "wouldn" to "message"
and "would" respectively in DumpRenderTree.

  • DumpRenderTree/mac/DumpRenderTree.mm:

(resetDefaultsToConsistentValues):

LayoutTests:

Removed failing expectations from tests that require "mesage" to be corrected to "message".

Also modified to dynamically assert the marker positions so that we may catch regressions
without pixel results (we still dump pixel results via dumpAsText(true) for sanity check).

  • platform/mac/TestExpectations:
  • platform/mac/editing/spelling/autocorrection-contraction-expected.png:
  • platform/mac/editing/spelling/autocorrection-contraction-expected.txt:
  • platform/mac/editing/spelling/click-autocorrected-word-expected.png:
  • platform/mac/editing/spelling/click-autocorrected-word-expected.txt:
  • platform/mac/editing/spelling/click-autocorrected-word.html:
  • platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png:
  • platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt:
  • platform/mac/editing/spelling/delete-into-autocorrected-word.html:
  • platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png:
  • platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt:
  • platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html:
  • platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png:
  • platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt:
  • platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html:
  • platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png:
  • platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt:
  • platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html:
  • platform/mac-wk2/TestExpectations:
Location:
trunk
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r147983 r147994  
     12013-04-09  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION: Autocorrection doesn't work in DumpRenderTree
     4        https://bugs.webkit.org/show_bug.cgi?id=113846
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        Removed failing expectations from tests that require "mesage" to be corrected to "message".
     9
     10        Also modified to dynamically assert the marker positions so that we may catch regressions
     11        without pixel results (we still dump pixel results via dumpAsText(true) for sanity check).
     12
     13        * platform/mac/TestExpectations:
     14        * platform/mac/editing/spelling/autocorrection-contraction-expected.png:
     15        * platform/mac/editing/spelling/autocorrection-contraction-expected.txt:
     16        * platform/mac/editing/spelling/click-autocorrected-word-expected.png:
     17        * platform/mac/editing/spelling/click-autocorrected-word-expected.txt:
     18        * platform/mac/editing/spelling/click-autocorrected-word.html:
     19        * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.png:
     20        * platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt:
     21        * platform/mac/editing/spelling/delete-into-autocorrected-word.html:
     22        * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.png:
     23        * platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt:
     24        * platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html:
     25        * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.png:
     26        * platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt:
     27        * platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html:
     28        * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.png:
     29        * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt:
     30        * platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html:
     31        * platform/mac-wk2/TestExpectations:
     32
    1332013-04-08  Mihai Maerean  <mmaerean@adobe.com>
    234
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r147978 r147994  
    167167# [WK2] [Mac] Spellcheck tests don't seem to work
    168168webkit.org/b/105616 platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation.html [ Failure ]
     169webkit.org/b/105616 platform/mac/editing/spelling/click-autocorrected-word.html
     170webkit.org/b/105616 platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
     171webkit.org/b/105616 platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
     172webkit.org/b/105616 platform/mac/editing/spelling/delete-into-autocorrected-word.html
     173webkit.org/b/105616 platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
    169174
    170175# [WK2] [Mac] Support drag in mouse events for WebKit2 EventSender
  • trunk/LayoutTests/platform/mac/TestExpectations

    r147971 r147994  
    687687# Spelling tests that are flakey. https://bugs.webkit.org/show_bug.cgi?id=82555
    688688editing/spelling/spellcheck-async-mutation.html
    689 platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html
    690 platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html
    691 platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html
    692 platform/mac/editing/spelling/editing-word-with-marker-1.html
    693 platform/mac/editing/spelling/delete-into-autocorrected-word.html
    694 platform/mac/editing/spelling/click-autocorrected-word.html
    695 platform/mac/editing/spelling/autocorrection-contraction.html
    696689
    697690# https://bugs.webkit.org/show_bug.cgi?id=82665
  • trunk/LayoutTests/platform/mac/editing/spelling/autocorrection-contraction-expected.txt

    r111031 r147994  
    152152EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    153153EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     154EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     155EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
     156EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     157EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     158EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     159EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     160EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     161EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     162EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     163EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     164EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     165EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     166EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     167EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     168EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     169EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     170EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     171EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     172EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     173EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     174EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     175EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     176EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     177EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     178EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     179EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     180EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     181EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     182EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     183EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 13 of #text > DIV > DIV > BODY > HTML > #document to 13 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     184EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     185EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     186EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > DIV > BODY > HTML > #document to 13 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     187EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     188EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     189EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     190EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     191EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     192EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     193EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     194EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     195EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     196EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     197EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     198EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     199EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     200EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     201EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     202EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     203EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     204EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     205EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     206EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     207EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     208EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     209EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     210EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     211EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     212EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     213EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     214EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     215EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     216EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     217EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
     218EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     219EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     220EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     221EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     222EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     223EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
     224EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
     225EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    154226EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    155227EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
     
    174246EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    175247EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    176 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    177 EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
    178 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    179 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    180 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    181 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    182 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    183 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    184 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    185 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    186 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > DIV > BODY > HTML > #document to 13 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    187 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    188 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    189 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    190 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    191 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    192 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    193 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    194 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    195 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 1 of #text > DIV > DIV > BODY > HTML > #document to 1 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    196 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    197 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    198 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 2 of #text > DIV > DIV > BODY > HTML > #document to 2 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    199 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    200 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    201 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 3 of #text > DIV > DIV > BODY > HTML > #document to 3 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    202 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    203 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    204 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 4 of #text > DIV > DIV > BODY > HTML > #document to 4 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    205 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    206 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    207 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    208 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    209 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    210 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 6 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    211 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    212 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    213 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 8 of #text > DIV > DIV > BODY > HTML > #document to 8 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    214 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    215 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    216 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    217 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 7 of #text > DIV > DIV > BODY > HTML > #document to 7 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    218 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    219 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    220 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 9 of #text > DIV > DIV > BODY > HTML > #document to 9 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    221 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    222 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    223 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 10 of #text > DIV > DIV > BODY > HTML > #document to 10 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    224 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    225 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    226 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 11 of #text > DIV > DIV > BODY > HTML > #document to 11 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    227 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    228 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    229 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 12 of #text > DIV > DIV > BODY > HTML > #document to 12 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 13 of #text > DIV > DIV > BODY > HTML > #document to 13 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    230 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    231 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    232 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 13 of #text > DIV > DIV > BODY > HTML > #document to 13 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    233 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    234 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    235 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    236 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    237 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    238 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    239 EDITING DELEGATE: shouldInsertText:would replacingDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document givenAction:WebViewInsertActionTyped
    240 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    241 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 0 of #text > DIV > DIV > BODY > HTML > #document to 6 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    242 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    243 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    244 EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 0 of DIV > DIV > BODY > HTML > #document to 0 of DIV > DIV > BODY > HTML > #document toDOMRange:range from 5 of #text > DIV > DIV > BODY > HTML > #document to 5 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    245 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    246 EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    247 EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    248248EDITING DELEGATE: shouldChangeSelectedDOMRange:range from 14 of #text > DIV > DIV > BODY > HTML > #document to 14 of #text > DIV > DIV > BODY > HTML > #document toDOMRange:range from 15 of #text > DIV > DIV > BODY > HTML > #document to 15 of #text > DIV > DIV > BODY > HTML > #document affinity:NSSelectionAffinityDownstream stillSelecting:FALSE
    249249EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
  • trunk/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word-expected.txt

    r97384 r147994  
    5858EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5959EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    60 layer at (0,0) size 800x600
    61   RenderView at (0,0) size 800x600
    62 layer at (0,0) size 800x600
    63   RenderBlock {HTML} at (0,0) size 800x600
    64     RenderBody {BODY} at (8,8) size 784x584
    65       RenderBlock {P} at (0,0) size 784x36
    66         RenderText {#text} at (0,0) size 753x36
    67           text run at (0,0) width 753: "The test verified that if user clicks a word that is marked as autocorrected, the autocorrection underline will remain. You"
    68           text run at (0,18) width 460: "should see phrase \"it's a message\", in which the word 'message' has blue "
    69           text run at (460,18) width 63: "underline."
    70       RenderBlock {P} at (0,52) size 784x54 [color=#008000]
    71         RenderText {#text} at (0,0) size 774x54
    72           text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
    73           text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
    74           text run at (0,18) width 216: "spelling of 'mesage' several times, "
    75           text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
    76           text run at (0,36) width 185: "all files in ~/Library/Spelling."
    77       RenderBlock {DIV} at (0,122) size 784x18
    78         RenderText {#text} at (0,0) size 89x18
    79           text run at (0,0) width 85: "it's a message"
    80           text run at (85,0) width 4: " "
    81         RenderText {#text} at (0,0) size 0x0
    82 caret: position 10 of child 0 {#text} of child 5 {DIV} of body
     60PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
     61PASS markerRange.toString() is 'message'
     62PASS markerRange.endContainer is textNode
     63PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
     64PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
     65PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
     66PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
     67PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
     68PASS successfullyParsed is true
     69
     70TEST COMPLETE
     71The test verified that if user clicks a word that is marked as autocorrected, the autocorrection underline will remain. You should see phrase "it's a message", in which the word 'message' has blue underline.
     72
     73Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
     74
     75it's a message 
  • trunk/LayoutTests/platform/mac/editing/spelling/click-autocorrected-word.html

    r80226 r147994  
    22<head>
    33<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
     4<script src="../../../../fast/js/resources/js-test-pre.js"></script>
    45<script>
    56
     
    2324    typeCharacterCommand(' ');
    2425    s.setBaseAndExtent(edit.firstChild, 10, edit.firstChild, 10);
     26
     27    if (window.testRunner) {
     28        testRunner.dumpAsText(true);
     29        textNode = edit.firstChild;
     30        shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
     31        shouldBe("markerRange.toString()", "'message'");
     32        shouldBe("markerRange.endContainer", "textNode");
     33        shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
     34        shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
     35        shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
     36        shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
     37        shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
     38    }
    2539}
    2640
     
    4054runEditingTest();
    4155</script>
     56<script src="../../../../fast/js/resources/js-test-post.js"></script>
    4257</body>
    4358</html>
  • trunk/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word-expected.txt

    r97384 r147994  
    6161EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6262EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    63 layer at (0,0) size 800x600
    64   RenderView at (0,0) size 800x600
    65 layer at (0,0) size 800x600
    66   RenderBlock {HTML} at (0,0) size 800x600
    67     RenderBody {BODY} at (8,8) size 784x584
    68       RenderBlock {P} at (0,0) size 784x18
    69         RenderText {#text} at (0,0) size 612x18
    70           text run at (0,0) width 373: "You should see phrase \"it's a message\", in which the word "
    71           text run at (373,0) width 239: "'message' doesn't have blue underline."
    72       RenderBlock {P} at (0,34) size 784x54 [color=#008000]
    73         RenderText {#text} at (0,0) size 774x54
    74           text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
    75           text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
    76           text run at (0,18) width 216: "spelling of 'mesage' several times, "
    77           text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
    78           text run at (0,36) width 185: "all files in ~/Library/Spelling."
    79       RenderBlock {DIV} at (0,104) size 784x18
    80         RenderText {#text} at (0,0) size 85x18
    81           text run at (0,0) width 85: "it's a message"
    82         RenderText {#text} at (0,0) size 0x0
    83 caret: position 14 of child 0 {#text} of child 5 {DIV} of body
     63PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
     64PASS markerRange.toString() is 'message'
     65PASS markerRange.endContainer is textNode
     66PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
     67PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
     68PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
     69PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
     70PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
     71PASS successfullyParsed is true
     72
     73TEST COMPLETE
     74You should see phrase "it's a message", in which the word 'message' doesn't have blue underline.
     75
     76Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
     77
     78it's a message
  • trunk/LayoutTests/platform/mac/editing/spelling/delete-into-autocorrected-word.html

    r80226 r147994  
    22<head>
    33<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
     4<script src="../../../../fast/js/resources/js-test-pre.js"></script>
    45<script>
    56
     
    2223    typeCharacterCommand(' ');
    2324    execDeleteCommand();
     25
     26    if (window.testRunner) {
     27        testRunner.dumpAsText(true);
     28        textNode = edit.firstChild;
     29        shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
     30        shouldBe("markerRange.toString()", "'message'");
     31        shouldBe("markerRange.endContainer", "textNode");
     32        shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
     33        shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
     34        shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
     35        shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
     36        shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
     37    }
    2438}
    2539
     
    3852runEditingTest();
    3953</script>
     54<script src="../../../../fast/js/resources/js-test-post.js"></script>
    4055</body>
    4156</html>
  • trunk/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word-expected.txt

    r97384 r147994  
    6161EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6262EDITING DELEGATE: webViewDidChange:WebViewDidChangeNotification
    63 layer at (0,0) size 800x600
    64   RenderView at (0,0) size 800x600
    65 layer at (0,0) size 800x600
    66   RenderBlock {HTML} at (0,0) size 800x600
    67     RenderBody {BODY} at (8,8) size 784x584
    68       RenderBlock {P} at (0,0) size 784x18
    69         RenderText {#text} at (0,0) size 608x18
    70           text run at (0,0) width 369: "You should see phrase \"it's amessage\", in which the word "
    71           text run at (369,0) width 239: "'message' doesn't have blue underline."
    72       RenderBlock {P} at (0,34) size 784x54 [color=#008000]
    73         RenderText {#text} at (0,0) size 774x54
    74           text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
    75           text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
    76           text run at (0,18) width 216: "spelling of 'mesage' several times, "
    77           text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
    78           text run at (0,36) width 185: "all files in ~/Library/Spelling."
    79       RenderBlock {DIV} at (0,104) size 784x18
    80         RenderText {#text} at (0,0) size 85x18
    81           text run at (0,0) width 81: "it's amessage"
    82           text run at (81,0) width 4: " "
    83         RenderText {#text} at (0,0) size 0x0
    84 caret: position 6 of child 0 {#text} of child 5 {DIV} of body
     63PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
     64PASS markerRange.toString() is 'message'
     65PASS markerRange.endContainer is textNode
     66PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
     67PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
     68PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
     69PASS markerRange = internals.markerRangeForNode(textNode, 'spelling', 0); markerRange.startContainer is textNode
     70PASS markerRange.toString() is 'amessage'
     71PASS markerRange.endContainer is textNode
     72PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
     73PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
     74PASS internals.markerRangeForNode(textNode, 'spelling', 1) is null
     75PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
     76PASS successfullyParsed is true
     77
     78TEST COMPLETE
     79You should see phrase "it's amessage", in which the word 'message' doesn't have blue underline.
     80
     81Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
     82
     83it's amessage 
  • trunk/LayoutTests/platform/mac/editing/spelling/forward-delete-into-autocorrected-word.html

    r80226 r147994  
    22<head>
    33<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
     4<script src="../../../../fast/js/resources/js-test-pre.js"></script>
    45<script>
    56
     
    2425    s.setBaseAndExtent(edit.firstChild, 6, edit.firstChild, 6);
    2526    execForwardDeleteCommand();
     27
     28    if (window.testRunner) {
     29        testRunner.dumpAsText(true);
     30        textNode = edit.firstChild;
     31        shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
     32        shouldBe("markerRange.toString()", "'message'");
     33        shouldBe("markerRange.endContainer", "textNode");
     34        shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
     35        shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
     36        shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
     37
     38        shouldBe("markerRange = internals.markerRangeForNode(textNode, 'spelling', 0); markerRange.startContainer", "textNode");
     39        shouldBe("markerRange.toString()", "'amessage'");
     40        shouldBe("markerRange.endContainer", "textNode");
     41        shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
     42        shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
     43        shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 1)");
     44
     45        shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
     46    }
    2647}
    2748
     
    4061runEditingTest();
    4162</script>
     63<script src="../../../../fast/js/resources/js-test-post.js"></script>
    4264</body>
    4365</html>
  • trunk/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word-expected.txt

    r97384 r147994  
    5858EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    5959EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    60 layer at (0,0) size 800x600
    61   RenderView at (0,0) size 800x600
    62 layer at (0,0) size 800x600
    63   RenderBlock {HTML} at (0,0) size 800x600
    64     RenderBody {BODY} at (8,8) size 784x584
    65       RenderBlock {P} at (0,0) size 784x36
    66         RenderText {#text} at (0,0) size 766x36
    67           text run at (0,0) width 653: "The test verified that if user used arrow key to move cursor into a word that is marked as autocorrected, "
    68           text run at (653,0) width 113: "the autocorrection"
    69           text run at (0,18) width 515: "underline will remain. You should see phrase \"it's a message\", in which the word "
    70           text run at (515,18) width 182: "'message' has blue underline."
    71       RenderBlock {P} at (0,52) size 784x54 [color=#008000]
    72         RenderText {#text} at (0,0) size 774x54
    73           text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
    74           text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
    75           text run at (0,18) width 216: "spelling of 'mesage' several times, "
    76           text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
    77           text run at (0,36) width 185: "all files in ~/Library/Spelling."
    78       RenderBlock {DIV} at (0,122) size 784x18
    79         RenderText {#text} at (0,0) size 89x18
    80           text run at (0,0) width 85: "it's a message"
    81           text run at (85,0) width 4: " "
    82         RenderText {#text} at (0,0) size 0x0
    83 caret: position 14 of child 0 {#text} of child 5 {DIV} of body
     60PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
     61PASS markerRange.toString() is 'message'
     62PASS markerRange.endContainer is textNode
     63PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
     64PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
     65PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
     66PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
     67PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
     68PASS successfullyParsed is true
     69
     70TEST COMPLETE
     71The test verified that if user used arrow key to move cursor into a word that is marked as autocorrected, the autocorrection underline will remain. You should see phrase "it's a message", in which the word 'message' has blue underline.
     72
     73Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
     74
     75it's a message 
  • trunk/LayoutTests/platform/mac/editing/spelling/move-cursor-to-autocorrected-word.html

    r80226 r147994  
    22<head>
    33<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
     4<script src="../../../../fast/js/resources/js-test-pre.js"></script>
    45<script>
    56
     
    2223    typeCharacterCommand(' ');
    2324    execMoveSelectionBackwardByCharacterCommand();
     25
     26    if (window.testRunner) {
     27        testRunner.dumpAsText(true);
     28        textNode = edit.firstChild;
     29        shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
     30        shouldBe("markerRange.toString()", "'message'");
     31        shouldBe("markerRange.endContainer", "textNode");
     32        shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
     33        shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
     34        shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
     35        shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
     36        shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
     37    }
    2438}
    2539
     
    3953runEditingTest();
    4054</script>
     55<script src="../../../../fast/js/resources/js-test-post.js"></script>
    4156</body>
    4257</html>
  • trunk/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word-expected.txt

    r97384 r147994  
    5959EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    6060EDITING DELEGATE: webViewDidChangeSelection:WebViewDidChangeSelectionNotification
    61 layer at (0,0) size 800x600
    62   RenderView at (0,0) size 800x600
    63 layer at (0,0) size 800x600
    64   RenderBlock {HTML} at (0,0) size 800x600
    65     RenderBody {BODY} at (8,8) size 784x584
    66       RenderBlock {P} at (0,0) size 784x36
    67         RenderText {#text} at (0,0) size 741x36
    68           text run at (0,0) width 453: "The test verified that if user moves caret to the beginning of a word that "
    69           text run at (453,0) width 288: "is marked as autocorrected, the autocorrection"
    70           text run at (0,18) width 328: "underline will remain. You should see phrase \"it's a "
    71           text run at (328,18) width 369: "message\", in which the word 'message' has blue underline."
    72       RenderBlock {P} at (0,52) size 784x54 [color=#008000]
    73         RenderText {#text} at (0,0) size 774x54
    74           text run at (0,0) width 393: "Note, this test can fail due to user specific spell checking data. "
    75           text run at (393,0) width 373: "If the user has previously dismissed 'message' as the correct"
    76           text run at (0,18) width 216: "spelling of 'mesage' several times, "
    77           text run at (216,18) width 558: "the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove"
    78           text run at (0,36) width 185: "all files in ~/Library/Spelling."
    79       RenderBlock {DIV} at (0,122) size 784x18
    80         RenderText {#text} at (0,0) size 89x18
    81           text run at (0,0) width 85: "it's a message"
    82           text run at (85,0) width 4: " "
    83         RenderText {#text} at (0,0) size 0x0
    84 caret: position 7 of child 0 {#text} of child 5 {DIV} of body
     61PASS markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer is textNode
     62PASS markerRange.toString() is 'message'
     63PASS markerRange.endContainer is textNode
     64PASS markerRange.startOffset is textNode.textContent.indexOf(markerRange.toString())
     65PASS markerRange.endOffset is markerRange.startOffset + markerRange.toString().length
     66PASS internals.markerRangeForNode(textNode, 'replacement', 1) is null
     67PASS internals.markerRangeForNode(textNode, 'spelling', 0) is null
     68PASS internals.markerRangeForNode(textNode, 'autocorrected', 0) is null
     69PASS successfullyParsed is true
     70
     71TEST COMPLETE
     72The test verified that if user moves caret to the beginning of a word that is marked as autocorrected, the autocorrection underline will remain. You should see phrase "it's a message", in which the word 'message' has blue underline.
     73
     74Note, this test can fail due to user specific spell checking data. If the user has previously dismissed 'message' as the correct spelling of 'mesage' several times, the spell checker will not provide 'message' as a suggestion anymore. To fix this, remove all files in ~/Library/Spelling.
     75
     76it's a message 
  • trunk/LayoutTests/platform/mac/editing/spelling/move-cursor-to-beginning-of-autocorrected-word.html

    r80226 r147994  
    22<head>
    33<script src=../../../../editing/editing.js language="javascript" type="text/javascript"></script>
     4<script src="../../../../fast/js/resources/js-test-pre.js"></script>
    45<script>
    56
     7var textNode;
     8var markerRange;
    69function editingTest() {
    710    edit = document.getElementById('edit');
     
    2427    s.setBaseAndExtent(edit.firstChild, 6, edit.firstChild, 6);
    2528    execMoveSelectionForwardByCharacterCommand();
     29
     30    if (window.testRunner) {
     31        testRunner.dumpAsText(true);
     32        textNode = edit.firstChild;
     33        shouldBe("markerRange = internals.markerRangeForNode(textNode, 'replacement', 0); markerRange.startContainer", "textNode");
     34        shouldBe("markerRange.toString()", "'message'");
     35        shouldBe("markerRange.endContainer", "textNode");
     36        shouldBe("markerRange.startOffset", "textNode.textContent.indexOf(markerRange.toString())");
     37        shouldBe("markerRange.endOffset", "markerRange.startOffset + markerRange.toString().length");
     38        shouldBeNull("internals.markerRangeForNode(textNode, 'replacement', 1)");
     39        shouldBeNull("internals.markerRangeForNode(textNode, 'spelling', 0)");
     40        shouldBeNull("internals.markerRangeForNode(textNode, 'autocorrected', 0)");
     41    }
    2642}
    2743
     
    4157runEditingTest();
    4258</script>
     59<script src="../../../../fast/js/resources/js-test-post.js"></script>
    4360</body>
    4461</html>
  • trunk/Tools/ChangeLog

    r147991 r147994  
     12013-04-09  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION: Autocorrection doesn't work in DumpRenderTree
     4        https://bugs.webkit.org/show_bug.cgi?id=113846
     5
     6        Reviewed by Alexey Proskuryakov.
     7
     8        The problem was that we were replacing NSSpellCheck's dictionary with our own
     9        in DumpRenderTree but we were not adding necessary corrections to the dictionary.
     10
     11        Fixed the bug by having NSSpellChecker correct "mesage" and "wouldn" to "message"
     12        and "would" respectively in DumpRenderTree.
     13
     14        * DumpRenderTree/mac/DumpRenderTree.mm:
     15        (resetDefaultsToConsistentValues):
     16
    1172013-04-09  Benjamin Poulain  <benjamin@webkit.org>
    218
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r147705 r147994  
    597597
    598598#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
    599     [defaults setObject:[NSDictionary dictionaryWithObjectsAndKeys:@"notational", @"notationl", nil] forKey:@"NSTestCorrectionDictionary"];
     599    [defaults setObject:[NSDictionary dictionaryWithObjectsAndKeys:
     600        @"notational", @"notationl",
     601        @"message", @"mesage",
     602        @"would", @"wouldn",
     603        nil] forKey:@"NSTestCorrectionDictionary"];
    600604#endif
    601605
Note: See TracChangeset for help on using the changeset viewer.