Changeset 148282 in webkit


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

[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:
Location:
trunk
Files:
6 deleted
26 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r148268 r148282  
     12013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        [Mac] Enable spellchecking tests added in r141471
     4        https://bugs.webkit.org/show_bug.cgi?id=108525
     5
     6        Reviewed by Darin Adler.
     7
     8        Updated the tests not to assume spelling correction suggestions were listed in a context menu since
     9        only Chromium port did this.
     10
     11        * editing/spelling/resources/util.js:
     12        (initSpellTest): Disable automatic text replacements.
     13
     14        * editing/spelling/spelling-with-underscore-selection-expected.txt: Removed.
     15        * editing/spelling/spelling-with-underscore-selection.html: Removed.
     16
     17        This test erroneously assumed a specific word breaking behavior that doesn't include the underscore
     18        when selecting a word especially since Chromium was the only port that was running these tests.
     19
     20        * editing/spelling/spelling-double-clicked-word-with-underscores-expected.txt: Removed.
     21        * editing/spelling/spelling-double-clicked-word-with-underscores.html: Removed.
     22
     23        Ditto.
     24
     25        * editing/spelling/spelling-should-select-single-word-expected.txt: Removed.
     26        * editing/spelling/spelling-should-select-single-word.html: Removed.
     27
     28        Removed since this test doesn't do anything useful without the assertion for the context menu.
     29
     30        * editing/spelling/spelling-double-clicked-word-expected.txt:
     31        * editing/spelling/spelling-double-clicked-word.html:
     32        * editing/spelling/spelling-exactly-selected-word-expected.txt:
     33        * editing/spelling/spelling-exactly-selected-word.html:
     34        * editing/spelling/spelling-with-punctuation-selection-expected.txt:
     35        * editing/spelling/spelling-with-punctuation-selection.html:
     36        * editing/spelling/spelling-with-whitespace-selection-expected.txt:
     37        * editing/spelling/spelling-with-whitespace-selection.html:
     38
     39        * platform/efl/TestExpectations:
     40        * platform/gtk/TestExpectations:
     41        * platform/mac/TestExpectations:
     42        * platform/qt/TestExpectations:
     43        * platform/win/TestExpectations:
     44        * platform/wincairo/TestExpectations:
     45        * platform/wk2/TestExpectations:
     46
    1472013-04-12  Zoltan Arvai  <zarvai@inf.u-szeged.hu>
    248
  • trunk/LayoutTests/editing/spelling/resources/util.js

    r145940 r148282  
    2727    testFunctionCallback = testFunction;
    2828    jsTestIsAsync = true;
     29
     30    internals.setAutomaticSpellingCorrectionEnabled(false);
     31
    2932    internals.settings.setAsynchronousSpellCheckingEnabled(true);
    3033    internals.settings.setSmartInsertDeleteEnabled(true);
     
    3235    internals.settings.setUnifiedTextCheckerEnabled(true);
    3336    internals.settings.setEditingBehavior("win");
     37
    3438    var destination = document.getElementById(testElementId);
    3539    destination.focus();
  • trunk/LayoutTests/editing/spelling/spelling-double-clicked-word-expected.txt

    r141354 r148282  
    99PASS spellingMarkerRange.toString() is "wellcome"
    1010PASS window.getSelection().toString() is "wellcome"
    11 PASS contextMenuElements[contextMenuElements.length - 1] is "welcome"
    1211PASS window.getSelection().toString() is ""
    1312PASS window.getSelection().toString() is "wellcome "
    1413PASS spellingMarkerRange.toString() is "wellcome"
    1514PASS window.getSelection().toString() is "wellcome "
    16 PASS contextMenuElements[contextMenuElements.length - 1] is "welcome"
    1715PASS successfullyParsed is true
    1816
  • trunk/LayoutTests/editing/spelling/spelling-double-clicked-word.html

    r145849 r148282  
    4545    shouldBeEqualToString("spellingMarkerRange.toString()", "wellcome");
    4646    shouldBeEqualToString("window.getSelection().toString()", "wellcome");
    47     shouldBeEqualToString("contextMenuElements[contextMenuElements.length - 1]", "welcome");
    4847
    4948    window.getSelection().removeAllRanges();
     
    7372    shouldBeEqualToString("spellingMarkerRange.toString()", "wellcome");
    7473    shouldBeEqualToString("window.getSelection().toString()", "wellcome ");
    75     shouldBeEqualToString("contextMenuElements[contextMenuElements.length - 1]", "welcome");
    7674});
    7775
  • trunk/LayoutTests/editing/spelling/spelling-exactly-selected-word-expected.txt

    r141354 r148282  
    99PASS spellingMarkerRange.toString() is "wellcome"
    1010PASS window.getSelection().toString() is "wellcome"
    11 PASS contextMenuElements[contextMenuElements.length - 1] is "welcome"
    1211PASS window.getSelection().toString() is "home"
    1312PASS window.getSelection().toString() is "home"
    14 PASS contextMenuElements[contextMenuElements.length - 1] is "<separator>"
    1513PASS successfullyParsed is true
    1614
  • trunk/LayoutTests/editing/spelling/spelling-exactly-selected-word.html

    r141354 r148282  
    3434    var y = destination.offsetParent.offsetTop + destination.offsetTop + destination.offsetHeight / 2;
    3535    eventSender.mouseMoveTo(x, y);
    36     contextMenuElements = eventSender.contextClick();
    3736    // Esc key to hide the context menu.
    3837    eventSender.keyDown(String.fromCharCode(0x001B), null);
     
    4140    shouldBeEqualToString("spellingMarkerRange.toString()", "wellcome");
    4241    shouldBeEqualToString("window.getSelection().toString()", "wellcome");
    43     shouldBeEqualToString("contextMenuElements[contextMenuElements.length - 1]", "welcome");
    4442   
    4543    // Select a correctly spelled word without surrounding whitespace or punctuation.
     
    5452    var y = destination.offsetParent.offsetTop + destination.offsetTop + destination.offsetHeight / 2;
    5553    eventSender.mouseMoveTo(x, y);
    56     contextMenuElements = eventSender.contextClick();
    5754    // Esc key to hide the context menu.
    5855    eventSender.keyDown(String.fromCharCode(0x001B), null);
    5956
    6057    shouldBeEqualToString("window.getSelection().toString()", "home");
    61     shouldBeEqualToString("contextMenuElements[contextMenuElements.length - 1]", "<separator>");
    6258});
    6359
  • trunk/LayoutTests/editing/spelling/spelling-with-punctuation-selection-expected.txt

    r141354 r148282  
    99PASS spellingMarkerRange.toString() is "wellcome"
    1010PASS window.getSelection().toString() is "wellcome!"
    11 PASS contextMenuElements[contextMenuElements.length - 1] is "welcome"
    1211PASS successfullyParsed is true
    1312
  • trunk/LayoutTests/editing/spelling/spelling-with-punctuation-selection.html

    r141354 r148282  
    3434    var y = destination.offsetParent.offsetTop + destination.offsetTop + destination.offsetHeight / 2;
    3535    eventSender.mouseMoveTo(x, y);
    36     contextMenuElements = eventSender.contextClick();
    3736    // Esc key to hide the context menu.
    3837    eventSender.keyDown(String.fromCharCode(0x001B), null);
     
    4140    shouldBeEqualToString("spellingMarkerRange.toString()", "wellcome");
    4241    shouldBeEqualToString("window.getSelection().toString()", "wellcome!");
    43     shouldBeEqualToString("contextMenuElements[contextMenuElements.length - 1]", "welcome");
    4442});
    4543
  • trunk/LayoutTests/editing/spelling/spelling-with-whitespace-selection-expected.txt

    r141354 r148282  
    88PASS spellingMarkerRange.toString() is "wellcome"
    99PASS window.getSelection().toString() is " wellcome "
    10 PASS contextMenuElements[contextMenuElements.length - 1] is "welcome"
    1110PASS successfullyParsed is true
    1211
  • trunk/LayoutTests/editing/spelling/spelling-with-whitespace-selection.html

    r141354 r148282  
    3333    var y = destination.offsetParent.offsetTop + destination.offsetTop + destination.offsetHeight / 2;
    3434    eventSender.mouseMoveTo(x, y);
    35     contextMenuElements = eventSender.contextClick();
    3635    // Esc key to hide the context menu.
    3736    eventSender.keyDown(String.fromCharCode(0x001B), null);
     
    4039    shouldBeEqualToString("spellingMarkerRange.toString()", "wellcome");
    4140    shouldBeEqualToString("window.getSelection().toString()", " wellcome ");
    42     shouldBeEqualToString("contextMenuElements[contextMenuElements.length - 1]", "welcome");
    4341});
    4442
  • trunk/LayoutTests/platform/efl/TestExpectations

    r148076 r148282  
    17421742# Spellchecker behavior tests.
    17431743webkit.org/b/108370 editing/spelling/spelling-double-clicked-word.html [ Skip ]
    1744 webkit.org/b/108370 editing/spelling/spelling-double-clicked-word-with-underscores.html [ Skip ]
    17451744webkit.org/b/108370 editing/spelling/spelling-exactly-selected-multiple-words.html [ Skip ]
    17461745webkit.org/b/108370 editing/spelling/spelling-exactly-selected-word.html [ Skip ]
    17471746webkit.org/b/108370 editing/spelling/spelling-multiword-selection.html [ Skip ]
    17481747webkit.org/b/108370 editing/spelling/spelling-should-select-multiple-words.html [ Skip ]
    1749 webkit.org/b/108370 editing/spelling/spelling-should-select-single-word.html [ Skip ]
    17501748webkit.org/b/108370 editing/spelling/spelling-subword-selection.html [ Skip ]
    17511749webkit.org/b/108370 editing/spelling/spelling-with-punctuation-selection.html [ Skip ]
    1752 webkit.org/b/108370 editing/spelling/spelling-with-underscore-selection.html [ Skip ]
    17531750webkit.org/b/108370 editing/spelling/spelling-with-whitespace-selection.html [ Skip ]
    17541751
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r148217 r148282  
    13111311# Spellchecker behavior tests.
    13121312webkit.org/b/108370 editing/spelling/spelling-double-clicked-word.html [ Skip ]
    1313 webkit.org/b/108370 editing/spelling/spelling-double-clicked-word-with-underscores.html [ Skip ]
    13141313webkit.org/b/108370 editing/spelling/spelling-exactly-selected-multiple-words.html [ Skip ]
    13151314webkit.org/b/108370 editing/spelling/spelling-exactly-selected-word.html [ Skip ]
    13161315webkit.org/b/108370 editing/spelling/spelling-multiword-selection.html [ Skip ]
    13171316webkit.org/b/108370 editing/spelling/spelling-should-select-multiple-words.html [ Skip ]
    1318 webkit.org/b/108370 editing/spelling/spelling-should-select-single-word.html [ Skip ]
    13191317webkit.org/b/108370 editing/spelling/spelling-subword-selection.html [ Skip ]
    13201318webkit.org/b/108370 editing/spelling/spelling-with-punctuation-selection.html [ Skip ]
    1321 webkit.org/b/108370 editing/spelling/spelling-with-underscore-selection.html [ Skip ]
    13221319webkit.org/b/108370 editing/spelling/spelling-with-whitespace-selection.html [ Skip ]
    13231320webkit.org/b/108370 editing/spelling/spelling-changed-text.html [ Failure ]
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r148255 r148282  
    166166
    167167# [WK2] [Mac] Spellcheck tests don't seem to work
     168webkit.org/b/105616 editing/spelling/spelling-changed-text.html
    168169webkit.org/b/105616 platform/mac/editing/spelling/removing-underline-after-accepting-autocorrection-using-punctuation.html [ Failure ]
    169170webkit.org/b/105616 platform/mac/editing/spelling/click-autocorrected-word.html
  • trunk/LayoutTests/platform/mac/TestExpectations

    r148115 r148282  
    14091409webkit.org/b/94198 tables/mozilla/collapsing_borders/bug41262-3.html [ Failure ]
    14101410
    1411 # Spellchecker behavior tests.
    1412 webkit.org/b/108370 editing/spelling/spelling-double-clicked-word.html [ Skip ]
    1413 webkit.org/b/108370 editing/spelling/spelling-double-clicked-word-with-underscores.html [ Skip ]
    1414 webkit.org/b/108370 editing/spelling/spelling-exactly-selected-multiple-words.html [ Skip ]
    1415 webkit.org/b/108370 editing/spelling/spelling-exactly-selected-word.html [ Skip ]
    1416 webkit.org/b/108370 editing/spelling/spelling-multiword-selection.html [ Skip ]
    1417 webkit.org/b/108370 editing/spelling/spelling-should-select-multiple-words.html [ Skip ]
    1418 webkit.org/b/108370 editing/spelling/spelling-should-select-single-word.html [ Skip ]
    1419 webkit.org/b/108370 editing/spelling/spelling-subword-selection.html [ Skip ]
    1420 webkit.org/b/108370 editing/spelling/spelling-with-punctuation-selection.html [ Skip ]
    1421 webkit.org/b/108370 editing/spelling/spelling-with-underscore-selection.html [ Skip ]
    1422 webkit.org/b/108370 editing/spelling/spelling-with-whitespace-selection.html [ Skip ]
    1423 webkit.org/b/108370 editing/spelling/spelling-changed-text.html [ Skip ]
     1411webkit.org/b/114470 editing/spelling/spelling-exactly-selected-multiple-words.html [ Skip ]
     1412webkit.org/b/114470 editing/spelling/spelling-should-select-multiple-words.html [ Skip ]
    14241413
    14251414webkit.org/b/110027 compositing/transitions/transform-on-large-layer.html [ Pass ImageOnlyFailure ]
  • trunk/LayoutTests/platform/qt/TestExpectations

    r148268 r148282  
    821821# https://bugs.webkit.org/show_bug.cgi?id=108370
    822822editing/spelling/spelling-double-clicked-word.html
    823 editing/spelling/spelling-double-clicked-word-with-underscores.html
    824823editing/spelling/spelling-exactly-selected-multiple-words.html
    825824editing/spelling/spelling-exactly-selected-word.html
    826825editing/spelling/spelling-multiword-selection.html
    827826editing/spelling/spelling-should-select-multiple-words.html
    828 editing/spelling/spelling-should-select-single-word.html
    829827editing/spelling/spelling-subword-selection.html
    830828editing/spelling/spelling-with-punctuation-selection.html
    831 editing/spelling/spelling-with-underscore-selection.html
    832829editing/spelling/spelling-with-whitespace-selection.html
    833830webkit.org/b/108370 editing/spelling/spelling-changed-text.html [ Failure ]
  • trunk/LayoutTests/platform/win/TestExpectations

    r148076 r148282  
    26562656# Spellchecker behavior tests.
    26572657webkit.org/b/108370 editing/spelling/spelling-double-clicked-word.html [ Skip ]
    2658 webkit.org/b/108370 editing/spelling/spelling-double-clicked-word-with-underscores.html [ Skip ]
    26592658webkit.org/b/108370 editing/spelling/spelling-exactly-selected-multiple-words.html [ Skip ]
    26602659webkit.org/b/108370 editing/spelling/spelling-exactly-selected-word.html [ Skip ]
    26612660webkit.org/b/108370 editing/spelling/spelling-multiword-selection.html [ Skip ]
    26622661webkit.org/b/108370 editing/spelling/spelling-should-select-multiple-words.html [ Skip ]
    2663 webkit.org/b/108370 editing/spelling/spelling-should-select-single-word.html [ Skip ]
    26642662webkit.org/b/108370 editing/spelling/spelling-subword-selection.html [ Skip ]
    26652663webkit.org/b/108370 editing/spelling/spelling-with-punctuation-selection.html [ Skip ]
    2666 webkit.org/b/108370 editing/spelling/spelling-with-underscore-selection.html [ Skip ]
    26672664webkit.org/b/108370 editing/spelling/spelling-with-whitespace-selection.html [ Skip ]
    26682665webkit.org/b/108370 editing/spelling/spellcheck-async-mutation.html [ Skip ]
  • trunk/LayoutTests/platform/wincairo/TestExpectations

    r147522 r148282  
    29882988# Spellchecker behavior tests.
    29892989webkit.org/b/108370 editing/spelling/spelling-double-clicked-word.html [ Skip ]
    2990 webkit.org/b/108370 editing/spelling/spelling-double-clicked-word-with-underscores.html [ Skip ]
    29912990webkit.org/b/108370 editing/spelling/spelling-exactly-selected-multiple-words.html [ Skip ]
    29922991webkit.org/b/108370 editing/spelling/spelling-exactly-selected-word.html [ Skip ]
    29932992webkit.org/b/108370 editing/spelling/spelling-multiword-selection.html [ Skip ]
    29942993webkit.org/b/108370 editing/spelling/spelling-should-select-multiple-words.html [ Skip ]
    2995 webkit.org/b/108370 editing/spelling/spelling-should-select-single-word.html [ Skip ]
    29962994webkit.org/b/108370 editing/spelling/spelling-subword-selection.html [ Skip ]
    29972995webkit.org/b/108370 editing/spelling/spelling-with-punctuation-selection.html [ Skip ]
    2998 webkit.org/b/108370 editing/spelling/spelling-with-underscore-selection.html [ Skip ]
    29992996webkit.org/b/108370 editing/spelling/spelling-with-whitespace-selection.html [ Skip ]
    30002997
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r148213 r148282  
    389389editing/spelling/spelling-attribute-change.html
    390390editing/spelling/spelling-double-clicked-word.html
    391 editing/spelling/spelling-double-clicked-word-with-underscores.html
    392391editing/spelling/spelling-exactly-selected-multiple-words.html
    393392editing/spelling/spelling-exactly-selected-word.html
     
    396395editing/spelling/spelling-multiword-selection.html
    397396editing/spelling/spelling-should-select-multiple-words.html
    398 editing/spelling/spelling-should-select-single-word.html
    399397editing/spelling/spelling-subword-selection.html
    400398editing/spelling/spelling-with-punctuation-selection.html
    401 editing/spelling/spelling-with-underscore-selection.html
    402399editing/spelling/spelling-with-whitespace-selection.html
    403400platform/mac/editing/spelling/delete-into-misspelled-word.html
  • trunk/Source/WebCore/ChangeLog

    r148275 r148282  
     12013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        [Mac] Enable spellchecking tests added in r141471
     4        https://bugs.webkit.org/show_bug.cgi?id=108525
     5
     6        Reviewed by Darin Adler.
     7
     8        Made automatic quote substitution, dash substitution, text replacement, and spelling correction
     9        togglable via internals object. These functions are no-op when text replacement is not used.
     10
     11        This allows us to disable automatic spelling correction in spellcheck tests.
     12
     13        Enabled several tests added in r141471.
     14
     15        * WebCore.exp.in:
     16        * testing/Internals.cpp:
     17        (WebCore::Internals::setContinuousSpellCheckingEnabled): Don't null check editor() since it's not
     18        null whenever frame() is not null.
     19        (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Added.
     20        (WebCore::Internals::setAutomaticLinkDetectionEnabled): Added.
     21        (WebCore::Internals::setAutomaticDashSubstitutionEnabled): Added.
     22        (WebCore::Internals::setAutomaticTextReplacementEnabled): Added.
     23        (WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Added.
     24        * testing/Internals.h:
     25        * testing/Internals.idl:
     26
    1272013-04-12  Alberto Garcia  <agarcia@igalia.com>
    228
  • trunk/Source/WebCore/WebCore.exp.in

    r148245 r148282  
    926926__ZN7WebCore6Editor26increaseSelectionListLevelEv
    927927__ZN7WebCore6Editor28replaceSelectionWithFragmentEN3WTF10PassRefPtrINS_16DocumentFragmentEEEbbb
     928__ZN7WebCore6Editor28toggleAutomaticLinkDetectionEv
    928929__ZN7WebCore6Editor29canDecreaseSelectionListLevelEv
    929930__ZN7WebCore6Editor29canIncreaseSelectionListLevelEv
     
    931932__ZN7WebCore6Editor30deleteSelectionWithSmartDeleteEb
    932933__ZN7WebCore6Editor30pasteAsPlainTextBypassingDHTMLEv
     934__ZN7WebCore6Editor30toggleAutomaticTextReplacementEv
     935__ZN7WebCore6Editor31isAutomaticLinkDetectionEnabledEv
     936__ZN7WebCore6Editor31toggleAutomaticDashSubstitutionEv
    933937__ZN7WebCore6Editor32guessesForUngrammaticalSelectionEv
     938__ZN7WebCore6Editor32toggleAutomaticQuoteSubstitutionEv
    934939__ZN7WebCore6Editor33increaseSelectionListLevelOrderedEv
     940__ZN7WebCore6Editor33isAutomaticTextReplacementEnabledEv
     941__ZN7WebCore6Editor33toggleAutomaticSpellingCorrectionEv
     942__ZN7WebCore6Editor34isAutomaticDashSubstitutionEnabledEv
    935943__ZN7WebCore6Editor34setMarkedTextMatchesAreHighlightedEb
    936944__ZN7WebCore6Editor35increaseSelectionListLevelUnorderedEv
     945__ZN7WebCore6Editor35isAutomaticQuoteSubstitutionEnabledEv
    937946__ZN7WebCore6Editor35setIgnoreCompositionSelectionChangeEb
     947__ZN7WebCore6Editor36isAutomaticSpellingCorrectionEnabledEv
    938948__ZN7WebCore6Editor38commandIsSupportedFromMenuOrKeyBindingERKN3WTF6StringE
    939949__ZN7WebCore6Editor39insertParagraphSeparatorInQuotedContentEv
  • trunk/Source/WebCore/testing/Internals.cpp

    r148123 r148282  
    15141514void Internals::setContinuousSpellCheckingEnabled(bool enabled, ExceptionCode&)
    15151515{
    1516     if (!contextDocument() || !contextDocument()->frame() || !contextDocument()->frame()->editor())
     1516    if (!contextDocument() || !contextDocument()->frame())
    15171517        return;
    15181518
    15191519    if (enabled != contextDocument()->frame()->editor()->isContinuousSpellCheckingEnabled())
    15201520        contextDocument()->frame()->editor()->toggleContinuousSpellChecking();
     1521}
     1522
     1523void Internals::setAutomaticQuoteSubstitutionEnabled(bool enabled, ExceptionCode&)
     1524{
     1525    if (!contextDocument() || !contextDocument()->frame())
     1526        return;
     1527
     1528#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     1529    if (enabled != contextDocument()->frame()->editor()->isAutomaticQuoteSubstitutionEnabled())
     1530        contextDocument()->frame()->editor()->toggleAutomaticQuoteSubstitution();
     1531#else
     1532    UNUSED_PARAM(enabled);
     1533#endif
     1534}
     1535
     1536void Internals::setAutomaticLinkDetectionEnabled(bool enabled, ExceptionCode&)
     1537{
     1538    if (!contextDocument() || !contextDocument()->frame())
     1539        return;
     1540
     1541#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     1542    if (enabled != contextDocument()->frame()->editor()->isAutomaticLinkDetectionEnabled())
     1543        contextDocument()->frame()->editor()->toggleAutomaticLinkDetection();
     1544#else
     1545    UNUSED_PARAM(enabled);
     1546#endif
     1547}
     1548
     1549void Internals::setAutomaticDashSubstitutionEnabled(bool enabled, ExceptionCode&)
     1550{
     1551    if (!contextDocument() || !contextDocument()->frame())
     1552        return;
     1553
     1554#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     1555    if (enabled != contextDocument()->frame()->editor()->isAutomaticDashSubstitutionEnabled())
     1556        contextDocument()->frame()->editor()->toggleAutomaticDashSubstitution();
     1557#else
     1558    UNUSED_PARAM(enabled);
     1559#endif
     1560}
     1561
     1562void Internals::setAutomaticTextReplacementEnabled(bool enabled, ExceptionCode&)
     1563{
     1564    if (!contextDocument() || !contextDocument()->frame())
     1565        return;
     1566
     1567#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     1568    if (enabled != contextDocument()->frame()->editor()->isAutomaticTextReplacementEnabled())
     1569        contextDocument()->frame()->editor()->toggleAutomaticTextReplacement();
     1570#else
     1571    UNUSED_PARAM(enabled);
     1572#endif
     1573}
     1574
     1575void Internals::setAutomaticSpellingCorrectionEnabled(bool enabled, ExceptionCode&)
     1576{
     1577    if (!contextDocument() || !contextDocument()->frame())
     1578        return;
     1579
     1580#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     1581    if (enabled != contextDocument()->frame()->editor()->isAutomaticSpellingCorrectionEnabled())
     1582        contextDocument()->frame()->editor()->toggleAutomaticSpellingCorrection();
     1583#else
     1584    UNUSED_PARAM(enabled);
     1585#endif
    15211586}
    15221587
  • trunk/Source/WebCore/testing/Internals.h

    r148050 r148282  
    202202    bool hasAutocorrectedMarker(Document*, int from, int length, ExceptionCode&);
    203203    void setContinuousSpellCheckingEnabled(bool enabled, ExceptionCode&);
     204    void setAutomaticQuoteSubstitutionEnabled(bool enabled, ExceptionCode&);
     205    void setAutomaticLinkDetectionEnabled(bool enabled, ExceptionCode&);
     206    void setAutomaticDashSubstitutionEnabled(bool enabled, ExceptionCode&);
     207    void setAutomaticTextReplacementEnabled(bool enabled, ExceptionCode&);
     208    void setAutomaticSpellingCorrectionEnabled(bool enabled, ExceptionCode&);
    204209
    205210    bool isOverwriteModeEnabled(Document*, ExceptionCode&);
  • trunk/Source/WebCore/testing/Internals.idl

    r148050 r148282  
    169169    boolean hasAutocorrectedMarker(in Document document, in long from, in long length) raises (DOMException);
    170170    void setContinuousSpellCheckingEnabled(in boolean enabled) raises (DOMException);
     171    void setAutomaticQuoteSubstitutionEnabled(in boolean enabled) raises (DOMException);
     172    void setAutomaticLinkDetectionEnabled(in boolean enabled) raises (DOMException);
     173    void setAutomaticDashSubstitutionEnabled(in boolean enabled) raises (DOMException);
     174    void setAutomaticTextReplacementEnabled(in boolean enabled) raises (DOMException);
     175    void setAutomaticSpellingCorrectionEnabled(in boolean enabled) raises (DOMException);
    171176
    172177    boolean isOverwriteModeEnabled(in Document document) raises (DOMException);
  • trunk/Tools/ChangeLog

    r148276 r148282  
     12013-04-12  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        [Mac] Enable spellchecking tests added in r141471
     4        https://bugs.webkit.org/show_bug.cgi?id=108525
     5
     6        Reviewed by Darin Adler.
     7
     8        * DumpRenderTree/mac/DumpRenderTree.mm:
     9        (createWebViewAndOffscreenWindow):
     10        (resetDefaultsToConsistentValues):
     11        * WebKitTestRunner/TestController.cpp:
     12        (WTR::TestController::resetStateToConsistentValues):
     13
    1142013-04-12  Manuel Rego Casasnovas  <rego@igalia.com>
    215
  • trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm

    r147994 r148282  
    540540   
    541541    [webView setContinuousSpellCheckingEnabled:YES];
     542    [webView setAutomaticQuoteSubstitutionEnabled:NO];
     543    [webView setAutomaticLinkDetectionEnabled:NO];
     544    [webView setAutomaticDashSubstitutionEnabled:NO];
     545    [webView setAutomaticTextReplacementEnabled:NO];
     546    [webView setAutomaticSpellingCorrectionEnabled:YES];
    542547    [webView setDefersCallbacks:NO];
    543548    [webView setGrammarCheckingEnabled:YES];
     
    601606        @"message", @"mesage",
    602607        @"would", @"wouldn",
     608        @"welcome", @"wellcome",
     609        @"uppercase", @"upper case",
    603610        nil] forKey:@"NSTestCorrectionDictionary"];
    604611#endif
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r145869 r148282  
    578578    WKTextCheckerContinuousSpellCheckingEnabledStateChanged(true);
    579579#endif
     580#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     581    WKTextCheckerAutomaticQuoteSubstitutionEnabledStateChanged(false);
     582    WKTextCheckerAutomaticLinkDetectionEnabledStateChanged(false);
     583    WKTextCheckerAutomaticDashSubstitutionEnabledStateChanged(false);
     584    WKTextCheckerAutomaticTextReplacementEnabledStateChanged(false);
     585    WKTextCheckerAutomaticSpellingCorrectionEnabledStateChanged(true);
     586#endif
    580587
    581588    // in the case that a test using the chrome input field failed, be sure to clean up for the next test
Note: See TracChangeset for help on using the changeset viewer.