[Mac] Enable spellchecking tests added in r141471
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 16:52:38 +0000 (16:52 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 12 Apr 2013 16:52:38 +0000 (16:52 +0000)
commit34443e8d291238740e0bdaed702fe2ac00387224
tree4989132939ddb382a729f5da1d57d4e3ab0b169c
parent1d1fcb56e8ac1d134bf103c539140567f353ca26
[Mac] Enable spellchecking tests added in r141471
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: https://svn.webkit.org/repository/webkit/trunk@148282 268f45cc-cd09-0410-ab3c-d52691b4dbfc
32 files changed:
LayoutTests/ChangeLog
LayoutTests/editing/spelling/resources/util.js
LayoutTests/editing/spelling/spelling-double-clicked-word-expected.txt
LayoutTests/editing/spelling/spelling-double-clicked-word-with-underscores-expected.txt [deleted file]
LayoutTests/editing/spelling/spelling-double-clicked-word-with-underscores.html [deleted file]
LayoutTests/editing/spelling/spelling-double-clicked-word.html
LayoutTests/editing/spelling/spelling-exactly-selected-word-expected.txt
LayoutTests/editing/spelling/spelling-exactly-selected-word.html
LayoutTests/editing/spelling/spelling-should-select-single-word-expected.txt [deleted file]
LayoutTests/editing/spelling/spelling-should-select-single-word.html [deleted file]
LayoutTests/editing/spelling/spelling-with-punctuation-selection-expected.txt
LayoutTests/editing/spelling/spelling-with-punctuation-selection.html
LayoutTests/editing/spelling/spelling-with-underscore-selection-expected.txt [deleted file]
LayoutTests/editing/spelling/spelling-with-underscore-selection.html [deleted file]
LayoutTests/editing/spelling/spelling-with-whitespace-selection-expected.txt
LayoutTests/editing/spelling/spelling-with-whitespace-selection.html
LayoutTests/platform/efl/TestExpectations
LayoutTests/platform/gtk/TestExpectations
LayoutTests/platform/mac-wk2/TestExpectations
LayoutTests/platform/mac/TestExpectations
LayoutTests/platform/qt/TestExpectations
LayoutTests/platform/win/TestExpectations
LayoutTests/platform/wincairo/TestExpectations
LayoutTests/platform/wk2/TestExpectations
Source/WebCore/ChangeLog
Source/WebCore/WebCore.exp.in
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Tools/ChangeLog
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/WebKitTestRunner/TestController.cpp