Skip to content
  • rniwa@webkit.org's avatar
    [Mac] Enable spellchecking tests added in r141471 · ebea09c0
    rniwa@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=108525
    
    Reviewed by Darin Adler.
    
    Source/WebCore:
    
    Made automatic quote substitution, dash substitution, text replacement, and spelling correction
    togglable via internals object. These functions are no-op when text replacement is not used.
    
    This allows us to disable automatic spelling correction in spellcheck tests.
    
    Enabled several tests added in r141471.
    
    * WebCore.exp.in:
    * testing/Internals.cpp:
    (WebCore::Internals::setContinuousSpellCheckingEnabled): Don't null check editor() since it's not
    null whenever frame() is not null.
    (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Added.
    (WebCore::Internals::setAutomaticLinkDetectionEnabled): Added.
    (WebCore::Internals::setAutomaticDashSubstitutionEnabled): Added.
    (WebCore::Internals::setAutomaticTextReplacementEnabled): Added.
    (WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Added.
    * testing/Internals.h:
    * testing/Internals.idl:
    
    Tools:
    
    * DumpRenderTree/mac/DumpRenderTree.mm:
    (createWebViewAndOffscreenWindow):
    (resetDefaultsToConsistentValues):
    * WebKitTestRunner/TestController.cpp:
    (WTR::TestController::resetStateToConsistentValues):
    
    LayoutTests:
    
    Updated the tests not to assume spelling correction suggestions were listed in a context menu since
    only Chromium port did this.
    
    * editing/spelling/resources/util.js:
    (initSpellTest): Disable automatic text replacements.
    
    * editing/spelling/spelling-with-underscore-selection-expected.txt: Removed.
    * editing/spelling/spelling-with-underscore-selection.html: Removed.
    
    This test erroneously assumed a specific word breaking behavior that doesn't include the underscore
    when selecting a word especially since Chromium was the only port that was running these tests.
    
    * editing/spelling/spelling-double-clicked-word-with-underscores-expected.txt: Removed.
    * editing/spelling/spelling-double-clicked-word-with-underscores.html: Removed.
    
    Ditto.
    
    * editing/spelling/spelling-should-select-single-word-expected.txt: Removed.
    * editing/spelling/spelling-should-select-single-word.html: Removed.
    
    Removed since this test doesn't do anything useful without the assertion for the context menu.
    
    * editing/spelling/spelling-double-clicked-word-expected.txt:
    * editing/spelling/spelling-double-clicked-word.html:
    * editing/spelling/spelling-exactly-selected-word-expected.txt:
    * editing/spelling/spelling-exactly-selected-word.html:
    * editing/spelling/spelling-with-punctuation-selection-expected.txt:
    * editing/spelling/spelling-with-punctuation-selection.html:
    * editing/spelling/spelling-with-whitespace-selection-expected.txt:
    * editing/spelling/spelling-with-whitespace-selection.html:
    
    * platform/efl/TestExpectations:
    * platform/gtk/TestExpectations:
    * platform/mac/TestExpectations:
    * platform/qt/TestExpectations:
    * platform/win/TestExpectations:
    * platform/wincairo/TestExpectations:
    * platform/wk2/TestExpectations:
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@148282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    ebea09c0