Changeset 206261 in webkit


Ignore:
Timestamp:
Sep 22, 2016 10:39:51 AM (8 years ago)
Author:
Jonathan Bedard
Message:

Automatic Text Replacement Testing in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=161919

Reviewed by Ryosuke Niwa.

Source/WebCore:

Fixing existing tests:

editing/inserting/smart-link-when-caret-is-moved-before-URL.html
editing/inserting/typing-space-to-trigger-smart-link.html

Implemented test hooks for text replacement for WebKit2.
Note that spell checking has not been implemented, so most tests which use text replacement still fail.

  • testing/Internals.cpp:

(WebCore::Internals::Internals): Reset TextChecker.
(WebCore::Internals::setContinuousSpellCheckingEnabled): Converted exception to an assert.
(WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Converted exception to an assert.
(WebCore::Internals::setAutomaticLinkDetectionEnabled): Converted exception to an assert.
(WebCore::Internals::setAutomaticDashSubstitutionEnabled): Converted exception to an assert.
(WebCore::Internals::setAutomaticTextReplacementEnabled): Converted exception to an assert.
(WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Converted exception to an assert.

  • testing/Internals.h: Removed exception argument for TextChecker setters.
  • testing/Internals.idl: Ditto.

Source/WebKit2:

Implemented test hooks for text replacement for WebKit2.
Note that spell checking has not been implemented, so most tests which use text replacement still fail.

  • UIProcess/API/C/WKTextChecker.cpp: Added #ifdefs to include file for iOS and Mac.

(WKTextCheckerSetTestingMode): Added.

  • UIProcess/API/C/WKTextChecker.h: Added #ifdefs to include file for iOS and Mac.
  • UIProcess/TextChecker.h: Added hooks to bypass writing to NSUserDefaults.
  • UIProcess/WebPageProxy.cpp:

(WebKit::WebPageProxy::toggleSmartInsertDelete): New message to toggle TextChecker flag.
(WebKit::WebPageProxy::toggleAutomaticQuoteSubstitution): Ditto.
(WebKit::WebPageProxy::toggleAutomaticLinkDetection): Ditto.
(WebKit::WebPageProxy::toggleAutomaticDashSubstitution): Ditto.
(WebKit::WebPageProxy::toggleAutomaticTextReplacement): Ditto.

  • UIProcess/WebPageProxy.h: Added messages to toggle TextChecker flags.
  • UIProcess/WebPageProxy.messages.in: Ditto.
  • UIProcess/efl/TextCheckerEfl.cpp: Implemented new TextChecker hooks for non-Cocoa platforms.
  • UIProcess/gtk/TextCheckerGtk.cpp: Ditto.

(WebKit::TextChecker::mutableState): Ditto.

  • UIProcess/ios/TextCheckerIOS.mm: Implemented new TextChecker hooks.

(WebKit::TextChecker::mutableState): Allow modification of text checker without writing to NSUserDefaults.
(WebKit::TextChecker::state): Call mutableState.
(WebKit::TextChecker::accessSmartInsertDeleteEnabled): Dummy function.

  • UIProcess/mac/TextCheckerMac.mm:

(WebKit::refresh): Reload TextChecker configuration from NSUserDefaults.
(WebKit::TextChecker::mutableState): Allow modification of text checker without writing to NSUserDefaults.
(WebKit::TextChecker::state): Call mutableState().
(WebKit::TextChecker::accessSmartInsertDeleteEnabled): Allow toggling of smartInsertDeleteEnabled without writing to NSUserDefaults.
(WebKit::initializeState): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundle.cpp:

(WKBundleSetAutomaticLinkDetectionEnabled): Deleted.

  • WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Removed WKBundleSetAutomaticLinkDetectionEnabled.
  • WebProcess/InjectedBundle/InjectedBundle.cpp:

(WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Deleted.

  • WebKit2.xcodeproj/project.pbxproj: Added WKTextChecker to Mac and iOS.
  • WebProcess/InjectedBundle/InjectedBundle.h: Remove setAutomaticLinkDetectionEnabled.
  • WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:

(WebKit::WebEditorClient::toggleSmartInsertDelete): Send message to UI process to toggle TextChecker.
(WebKit::WebEditorClient::toggleAutomaticQuoteSubstitution): Ditto.
(WebKit::WebEditorClient::toggleAutomaticLinkDetection): Ditto.
(WebKit::WebEditorClient::toggleAutomaticDashSubstitution): Ditto.
(WebKit::WebEditorClient::toggleAutomaticTextReplacement): Ditto.

Tools:

Implemented test hooks for text replacement for WebKit2.
Note that spell checking has not been implemented, so most tests which use text replacement still fail.

  • WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Removed setAutomaticLinkDetectionEnabled from TestRunner, moved to Internals.
  • WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: Ditto.

(WTR::InjectedBundle::beginTesting): Ditto.

  • WebKitTestRunner/InjectedBundle/TestRunner.cpp: Ditto.
  • WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.
  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::runTest): Place TextChecker into testing mode.

LayoutTests:

Implemented test hooks for text replacement for WebKit2.
Note that spell checking has not been implemented, so most tests which use text replacement still fail.

  • editing/inserting/smart-link-when-caret-is-moved-before-URL.html: Use internals instead of TestRunner.
  • editing/inserting/typing-space-to-trigger-smart-link.html: Ditto.
  • platform/efl/TestExpectations: Added port specific tests.
  • platform/gtk/TestExpectations: Added port specific tests.
  • platform/ios-simulator/TestExpectations: Added port specific tests.
  • platform/ios-simulator-wk1/TestExpectations: Moved skipped tests to ios-simulator.
  • platform/ios-simulator-wk2/TestExpectations: Moved skipped tests to ios-simulator.
  • platform/mac-wk2/TestExpectations: Removed passing test.
  • platform/win/TestExpectations: Added port specific tests.
  • platform/wk2/TestExpectations: Added better explanation for failing test.
Location:
trunk
Files:
38 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r206260 r206261  
     12016-09-22  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Automatic Text Replacement Testing in WebKit2
     4        https://bugs.webkit.org/show_bug.cgi?id=161919
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Implemented test hooks for text replacement for WebKit2.
     9        Note that spell checking has not been implemented, so most tests which use text replacement still fail.
     10
     11        * editing/inserting/smart-link-when-caret-is-moved-before-URL.html: Use internals instead of TestRunner.
     12        * editing/inserting/typing-space-to-trigger-smart-link.html: Ditto.
     13        * platform/efl/TestExpectations: Added port specific tests.
     14        * platform/gtk/TestExpectations: Added port specific tests.
     15        * platform/ios-simulator/TestExpectations: Added port specific tests.
     16        * platform/ios-simulator-wk1/TestExpectations: Moved skipped tests to ios-simulator.
     17        * platform/ios-simulator-wk2/TestExpectations: Moved skipped tests to ios-simulator.
     18        * platform/mac-wk2/TestExpectations: Removed passing test.
     19        * platform/win/TestExpectations: Added port specific tests.
     20        * platform/wk2/TestExpectations: Added better explanation for failing test.
     21
    1222016-09-22  Youenn Fablet  <youenn@apple.com>
    223
  • trunk/LayoutTests/editing/inserting/smart-link-when-caret-is-moved-before-URL.html

    r155276 r206261  
    77<script>
    88
    9 if (window.testRunner) {
     9if (window.testRunner)
    1010    testRunner.dumpAsText();
    11     testRunner.setAutomaticLinkDetectionEnabled(true);
    12 }
     11if (window.internals)
     12    internals.setAutomaticLinkDetectionEnabled(true);
    1313
    1414description('This test demonstrates that smart link doesn\'t erroneously trigger when the user moves the caret immediately before an URL.');
  • trunk/LayoutTests/editing/inserting/typing-space-to-trigger-smart-link.html

    r149322 r206261  
    55function runTest()
    66{
    7     if (window.testRunner) {
     7    if (window.testRunner)
    88        testRunner.dumpAsText();
    9         testRunner.setAutomaticLinkDetectionEnabled(true);
    10     }
     9    if (window.internals)
     10        internals.setAutomaticLinkDetectionEnabled(true);
    1111
    1212    var testTypeSpaceDiv = document.getElementById('testTypeSpace');
     
    4141        document.getElementById('log').textContent += "Failed: the expected content was '" + expectedContents + "', but the actual result was '" + testTypeLinkDiv.innerHTML + "'."
    4242
    43     if (window.testRunner)
    44         testRunner.setAutomaticLinkDetectionEnabled(false);
     43    if (window.internals)
     44        internals.setAutomaticLinkDetectionEnabled(false);
    4545}
    4646
  • trunk/LayoutTests/platform/efl/TestExpectations

    r206119 r206261  
    16671667
    16681668# EFL's LayoutTestController does not implement setAutomaticLinkDetectionEnabled
    1669 webkit.org/b/85463 editing/inserting/typing-space-to-trigger-smart-link.html
    1670 webkit.org/b/85463 editing/inserting/smart-link-when-caret-is-moved-before-URL.html
    1671 editing/inserting/smart-quote-with-all-configurations.html
     1669editing/inserting/typing-space-to-trigger-smart-link.html [ Skip ]
     1670editing/inserting/smart-link-when-caret-is-moved-before-URL.html [ Skip ]
     1671editing/inserting/smart-quote-with-all-configurations.html [ Skip ]
    16721672
    16731673# Failing after r119268 on GTK and EFL
  • trunk/LayoutTests/platform/gtk/TestExpectations

    r206119 r206261  
    389389webkit.org/b/133320 crypto/subtle/hmac-sign-verify-empty-key.html [ Pass ]
    390390webkit.org/b/133320 crypto/subtle/hmac-sign-verify.html [ Pass ]
     391
     392# GTK does not implement setAutomaticLinkDetectionEnabled
     393editing/inserting/typing-space-to-trigger-smart-link.html [ Skip ]
     394editing/inserting/smart-link-when-caret-is-moved-before-URL.html [ Skip ]
     395editing/inserting/smart-quote-with-all-configurations.html [ Skip ]
    391396
    392397# QuickTime plug-in not relevant to this port
     
    25972602webkit.org/b/161589 css3/masking/mask-repeat-space-padding.html [ ImageOnlyFailure ]
    25982603
    2599 webkit.org/b/161590 editing/inserting/typing-space-to-trigger-smart-link.html [ Failure ]
    2600 
    26012604#////////////////////////////////////////////////////////////////////////////////////////
    26022605# End of non-crashing, non-flaky tests failing
  • trunk/LayoutTests/platform/ios-simulator-wk1/TestExpectations

    r206248 r206261  
    248248editing/inserting/insert-character-in-first-letter-crash.html [ Failure ]
    249249editing/inserting/insert-tab-001.html [ Failure ]
    250 editing/inserting/smart-quote-with-all-configurations.html [ Failure ]
    251 editing/inserting/typing-space-to-trigger-smart-link.html [ Failure ]
    252250editing/secure-input/password-input-changed-type.html [ Failure ]
    253251editing/secure-input/password-input-focusing-to-different-frame.html [ Failure ]
  • trunk/LayoutTests/platform/ios-simulator-wk2/TestExpectations

    r206119 r206261  
    983983editing/inserting/insert-tab-004.html [ Failure ]
    984984editing/inserting/paragraph-outside-nested-divs.html [ Failure ]
    985 editing/inserting/smart-link-when-caret-is-moved-before-URL.html [ Failure ]
    986 editing/inserting/smart-quote-with-all-configurations.html [ Failure ]
    987985editing/inserting/typing-001.html [ Failure ]
    988986editing/inserting/typing-003.html [ Failure ]
    989987editing/inserting/typing-around-br-001.html [ Failure ]
    990988editing/inserting/typing-around-image-001.html [ Failure ]
    991 editing/inserting/typing-space-to-trigger-smart-link.html [ Failure ]
    992989editing/inserting/typing-tab-designmode-forms.html [ Failure ]
    993990editing/inserting/typing-tab-designmode.html [ Failure ]
  • trunk/LayoutTests/platform/ios-simulator/TestExpectations

    r206248 r206261  
    308308http/tests/security/history-username-password.html [ Skip ]
    309309fast/selectors/hover-invalidation-descendant-dynamic.html [ Skip ]
     310
     311# IOS does not implement setAutomaticLinkDetectionEnabled
     312editing/inserting/typing-space-to-trigger-smart-link.html [ Skip ]
     313editing/inserting/smart-link-when-caret-is-moved-before-URL.html [ Skip ]
     314editing/inserting/smart-quote-with-all-configurations.html [ Skip ]
    310315
    311316webkit.org/b/148695 fast/shadow-dom [ Pass ]
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r206155 r206261  
    132132webkit.org/b/105616 editing/spelling/editing-word-with-marker-2.html
    133133webkit.org/b/105616 editing/spelling/move-cursor-around-misspelled-word.html
    134 webkit.org/b/105616 editing/inserting/inserting-slash-inside-url-with-smart-link.html
    135134webkit.org/b/105616 editing/spelling/spelling-changed-text.html
    136135webkit.org/b/105616 editing/spelling/spelling-backspace-between-lines.html
     
    539538webkit.org/b/161148 gamepad/gamepad-timestamp.html [ Pass Failure ]
    540539
    541 webkit.org/b/161366 editing/pasteboard/5478250.html [ Pass Failure ]
    542 webkit.org/b/161366 [ Debug ] editing/mac/spelling/accept-misspelled-candidate.html [ Pass Failure ]
    543 webkit.org/b/161366 [ Debug ] editing/mac/spelling/autocorrection-contraction.html [ Pass Failure ]
    544 
    545540webkit.org/b/161633 [ Debug ] storage/indexeddb/objectstore-cursor.html [ Pass Timeout ]
    546541
     
    553548webkit.org/b/161549 fast/scrolling/arrow-key-scroll-in-rtl-document.html [ Pass Failure ]
    554549
     550webkit.org/b/162081 editing/inserting/typing-space-to-trigger-smart-link.html [ Failure ]
     551webkit.org/b/162081 editing/inserting/smart-quote-with-all-configurations.html [ Failure ]
     552
    555553webkit.org/b/160017 [ Debug ] js/regress-139548.html [ Pass Timeout ]
  • trunk/LayoutTests/platform/win/TestExpectations

    r206119 r206261  
    12421242
    12431243###### Inserting
    1244 # TODO testRunner::setAutomaticLinkDetectionEnabled isn't implemented
     1244# Windows does not implement setAutomaticLinkDetectionEnabled
    12451245editing/inserting/typing-space-to-trigger-smart-link.html [ Skip ]
    12461246editing/inserting/smart-link-when-caret-is-moved-before-URL.html [ Skip ]
  • trunk/LayoutTests/platform/wk2/TestExpectations

    r206131 r206261  
    237237fast/block/lineboxcontain/block-glyphs.html
    238238fast/block/lineboxcontain/font.html
    239 
    240 # Strange error in “Internals”
    241 editing/inserting/smart-quote-with-all-configurations.html
    242239
    243240# https://bugs.webkit.org/show_bug.cgi?id=115203
  • trunk/Source/WebCore/ChangeLog

    r206259 r206261  
     12016-09-22  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Automatic Text Replacement Testing in WebKit2
     4        https://bugs.webkit.org/show_bug.cgi?id=161919
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Fixing existing tests:
     9            editing/inserting/smart-link-when-caret-is-moved-before-URL.html
     10            editing/inserting/typing-space-to-trigger-smart-link.html
     11
     12        Implemented test hooks for text replacement for WebKit2.
     13        Note that spell checking has not been implemented, so most tests which use text replacement still fail.
     14
     15        * testing/Internals.cpp:
     16        (WebCore::Internals::Internals): Reset TextChecker.
     17        (WebCore::Internals::setContinuousSpellCheckingEnabled): Converted exception to an assert.
     18        (WebCore::Internals::setAutomaticQuoteSubstitutionEnabled): Converted exception to an assert.
     19        (WebCore::Internals::setAutomaticLinkDetectionEnabled): Converted exception to an assert.
     20        (WebCore::Internals::setAutomaticDashSubstitutionEnabled): Converted exception to an assert.
     21        (WebCore::Internals::setAutomaticTextReplacementEnabled): Converted exception to an assert.
     22        (WebCore::Internals::setAutomaticSpellingCorrectionEnabled): Converted exception to an assert.
     23        * testing/Internals.h: Removed exception argument for TextChecker setters.
     24        * testing/Internals.idl: Ditto.
     25
    1262016-09-22  Nan Wang  <n_wang@apple.com>
    227
  • trunk/Source/WebCore/testing/Internals.cpp

    r205765 r206261  
    434434#endif
    435435    RuntimeEnabledFeatures::sharedFeatures().reset();
     436
     437    if (contextDocument() && contextDocument()->frame()) {
     438        setAutomaticSpellingCorrectionEnabled(true);
     439        setAutomaticQuoteSubstitutionEnabled(false);
     440        setAutomaticDashSubstitutionEnabled(false);
     441        setAutomaticLinkDetectionEnabled(false);
     442        setAutomaticTextReplacementEnabled(true);
     443    }
    436444}
    437445
     
    16111619}
    16121620
    1613 void Internals::setContinuousSpellCheckingEnabled(bool enabled, ExceptionCode&)
     1621void Internals::setContinuousSpellCheckingEnabled(bool enabled)
    16141622{
    16151623    if (!contextDocument() || !contextDocument()->frame())
     
    16201628}
    16211629
    1622 void Internals::setAutomaticQuoteSubstitutionEnabled(bool enabled, ExceptionCode&)
     1630void Internals::setAutomaticQuoteSubstitutionEnabled(bool enabled)
    16231631{
    16241632    if (!contextDocument() || !contextDocument()->frame())
     
    16331641}
    16341642
    1635 void Internals::setAutomaticLinkDetectionEnabled(bool enabled, ExceptionCode&)
     1643void Internals::setAutomaticLinkDetectionEnabled(bool enabled)
    16361644{
    16371645    if (!contextDocument() || !contextDocument()->frame())
     
    16461654}
    16471655
    1648 void Internals::setAutomaticDashSubstitutionEnabled(bool enabled, ExceptionCode&)
     1656void Internals::setAutomaticDashSubstitutionEnabled(bool enabled)
    16491657{
    16501658    if (!contextDocument() || !contextDocument()->frame())
     
    16591667}
    16601668
    1661 void Internals::setAutomaticTextReplacementEnabled(bool enabled, ExceptionCode&)
     1669void Internals::setAutomaticTextReplacementEnabled(bool enabled)
    16621670{
    16631671    if (!contextDocument() || !contextDocument()->frame())
     
    16721680}
    16731681
    1674 void Internals::setAutomaticSpellingCorrectionEnabled(bool enabled, ExceptionCode&)
     1682void Internals::setAutomaticSpellingCorrectionEnabled(bool enabled)
    16751683{
    16761684    if (!contextDocument() || !contextDocument()->frame())
  • trunk/Source/WebCore/testing/Internals.h

    r205765 r206261  
    212212    bool hasGrammarMarker(int from, int length, ExceptionCode&);
    213213    bool hasAutocorrectedMarker(int from, int length, ExceptionCode&);
    214     void setContinuousSpellCheckingEnabled(bool enabled, ExceptionCode&);
    215     void setAutomaticQuoteSubstitutionEnabled(bool enabled, ExceptionCode&);
    216     void setAutomaticLinkDetectionEnabled(bool enabled, ExceptionCode&);
    217     void setAutomaticDashSubstitutionEnabled(bool enabled, ExceptionCode&);
    218     void setAutomaticTextReplacementEnabled(bool enabled, ExceptionCode&);
    219     void setAutomaticSpellingCorrectionEnabled(bool enabled, ExceptionCode&);
     214    void setContinuousSpellCheckingEnabled(bool);
     215    void setAutomaticQuoteSubstitutionEnabled(bool);
     216    void setAutomaticLinkDetectionEnabled(bool);
     217    void setAutomaticDashSubstitutionEnabled(bool);
     218    void setAutomaticTextReplacementEnabled(bool);
     219    void setAutomaticSpellingCorrectionEnabled(bool);
    220220
    221221    void handleAcceptedCandidate(const String& candidate, unsigned location, unsigned length, ExceptionCode&);
  • trunk/Source/WebCore/testing/Internals.idl

    r205765 r206261  
    208208    [RaisesException] boolean hasGrammarMarker(long from, long length);
    209209    [RaisesException] boolean hasAutocorrectedMarker(long from, long length);
    210     [RaisesException] void setContinuousSpellCheckingEnabled(boolean enabled);
    211     [RaisesException] void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
    212     [RaisesException] void setAutomaticLinkDetectionEnabled(boolean enabled);
    213     [RaisesException] void setAutomaticDashSubstitutionEnabled(boolean enabled);
    214     [RaisesException] void setAutomaticTextReplacementEnabled(boolean enabled);
    215     [RaisesException] void setAutomaticSpellingCorrectionEnabled(boolean enabled);
     210    void setContinuousSpellCheckingEnabled(boolean enabled);
     211    void setAutomaticQuoteSubstitutionEnabled(boolean enabled);
     212    void setAutomaticLinkDetectionEnabled(boolean enabled);
     213    void setAutomaticDashSubstitutionEnabled(boolean enabled);
     214    void setAutomaticTextReplacementEnabled(boolean enabled);
     215    void setAutomaticSpellingCorrectionEnabled(boolean enabled);
    216216
    217217    [RaisesException] void handleAcceptedCandidate(DOMString candidate, unsigned long location, unsigned long length);
  • trunk/Source/WebKit2/ChangeLog

    r206256 r206261  
     12016-09-22  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Automatic Text Replacement Testing in WebKit2
     4        https://bugs.webkit.org/show_bug.cgi?id=161919
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Implemented test hooks for text replacement for WebKit2.
     9        Note that spell checking has not been implemented, so most tests which use text replacement still fail.
     10
     11        * UIProcess/API/C/WKTextChecker.cpp: Added #ifdefs to include file for iOS and Mac.
     12        (WKTextCheckerSetTestingMode): Added.
     13        * UIProcess/API/C/WKTextChecker.h: Added #ifdefs to include file for iOS and Mac.
     14        * UIProcess/TextChecker.h: Added hooks to bypass writing to NSUserDefaults.
     15        * UIProcess/WebPageProxy.cpp:
     16        (WebKit::WebPageProxy::toggleSmartInsertDelete):  New message to toggle TextChecker flag.
     17        (WebKit::WebPageProxy::toggleAutomaticQuoteSubstitution): Ditto.
     18        (WebKit::WebPageProxy::toggleAutomaticLinkDetection): Ditto.
     19        (WebKit::WebPageProxy::toggleAutomaticDashSubstitution): Ditto.
     20        (WebKit::WebPageProxy::toggleAutomaticTextReplacement): Ditto.
     21        * UIProcess/WebPageProxy.h: Added messages to toggle TextChecker flags.
     22        * UIProcess/WebPageProxy.messages.in: Ditto.
     23        * UIProcess/efl/TextCheckerEfl.cpp: Implemented new TextChecker hooks for non-Cocoa platforms.
     24        * UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
     25        (WebKit::TextChecker::mutableState): Ditto.
     26        * UIProcess/ios/TextCheckerIOS.mm: Implemented new TextChecker hooks.
     27        (WebKit::TextChecker::mutableState): Allow modification of text checker without writing to NSUserDefaults.
     28        (WebKit::TextChecker::state): Call mutableState.
     29        (WebKit::TextChecker::accessSmartInsertDeleteEnabled): Dummy function.
     30        * UIProcess/mac/TextCheckerMac.mm:
     31        (WebKit::refresh): Reload TextChecker configuration from NSUserDefaults.
     32        (WebKit::TextChecker::mutableState): Allow modification of text checker without writing to NSUserDefaults.
     33        (WebKit::TextChecker::state): Call mutableState().
     34        (WebKit::TextChecker::accessSmartInsertDeleteEnabled): Allow toggling of smartInsertDeleteEnabled without writing to NSUserDefaults.
     35        (WebKit::initializeState): Deleted.
     36        * WebProcess/InjectedBundle/API/c/WKBundle.cpp:
     37        (WKBundleSetAutomaticLinkDetectionEnabled): Deleted.
     38        * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Removed WKBundleSetAutomaticLinkDetectionEnabled.
     39        * WebProcess/InjectedBundle/InjectedBundle.cpp:
     40        (WebKit::InjectedBundle::setAutomaticLinkDetectionEnabled): Deleted.
     41        * WebKit2.xcodeproj/project.pbxproj: Added WKTextChecker to Mac and iOS.
     42        * WebProcess/InjectedBundle/InjectedBundle.h: Remove setAutomaticLinkDetectionEnabled.
     43        * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
     44        (WebKit::WebEditorClient::toggleSmartInsertDelete): Send message to UI process to toggle TextChecker.
     45        (WebKit::WebEditorClient::toggleAutomaticQuoteSubstitution): Ditto.
     46        (WebKit::WebEditorClient::toggleAutomaticLinkDetection): Ditto.
     47        (WebKit::WebEditorClient::toggleAutomaticDashSubstitution): Ditto.
     48        (WebKit::WebEditorClient::toggleAutomaticTextReplacement): Ditto.
     49
    1502016-09-22  Carlos Garcia Campos  <cgarcia@igalia.com>
    251
  • trunk/Source/WebKit2/UIProcess/API/C/WKTextChecker.cpp

    r179409 r206261  
    2626#include "config.h"
    2727#include "WKTextChecker.h"
     28#include "TextChecker.h"
    2829
     30#if !defined(__APPLE__)
    2931#include "WKAPICast.h"
    3032#include "WebPageProxy.h"
    3133#include "WebTextChecker.h"
     34#endif
    3235
    3336using namespace WebKit;
     37
     38void WKTextCheckerSetTestingMode(bool enabled)
     39{
     40    TextChecker::setTestingMode(enabled);
     41}
     42
     43#if !defined(__APPLE__)
    3444
    3545void WKTextCheckerSetClient(const WKTextCheckerClientBase* wkClient)
     
    5969    WebTextChecker::singleton()->changeSpellingToWord(toImpl(page), toWTFString(word));
    6070}
     71
     72#endif
  • trunk/Source/WebKit2/UIProcess/API/C/WKTextChecker.h

    r168961 r206261  
    3232extern "C" {
    3333#endif
     34
     35WK_EXPORT void WKTextCheckerSetTestingMode(bool enabled);
     36
     37#if !defined(__APPLE__)
    3438
    3539// TextChecker Client
     
    8589WK_EXPORT void WKTextCheckerChangeSpellingToWord(WKPageRef page, WKStringRef word);
    8690
     91#endif
     92
    8793#ifdef __cplusplus
    8894}
  • trunk/Source/WebKit2/UIProcess/TextChecker.h

    r202185 r206261  
    4343    static void setContinuousSpellCheckingEnabled(bool);
    4444    static void setGrammarCheckingEnabled(bool);
     45   
     46    static void setTestingMode(bool);
     47    static bool isTestingMode();
    4548
    4649#if PLATFORM(COCOA)
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp

    r206256 r206261  
    59775977}
    59785978
     5979#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     5980
     5981void WebPageProxy::toggleSmartInsertDelete()
     5982{
     5983    if (TextChecker::isTestingMode())
     5984        TextChecker::setSmartInsertDeleteEnabled(!TextChecker::isSmartInsertDeleteEnabled());
     5985}
     5986
     5987void WebPageProxy::toggleAutomaticQuoteSubstitution()
     5988{
     5989    if (TextChecker::isTestingMode())
     5990        TextChecker::setAutomaticQuoteSubstitutionEnabled(!TextChecker::state().isAutomaticQuoteSubstitutionEnabled);
     5991}
     5992
     5993void WebPageProxy::toggleAutomaticLinkDetection()
     5994{
     5995    if (TextChecker::isTestingMode())
     5996        TextChecker::setAutomaticLinkDetectionEnabled(!TextChecker::state().isAutomaticLinkDetectionEnabled);
     5997}
     5998
     5999void WebPageProxy::toggleAutomaticDashSubstitution()
     6000{
     6001    if (TextChecker::isTestingMode())
     6002        TextChecker::setAutomaticDashSubstitutionEnabled(!TextChecker::state().isAutomaticDashSubstitutionEnabled);
     6003}
     6004
     6005void WebPageProxy::toggleAutomaticTextReplacement()
     6006{
     6007    if (TextChecker::isTestingMode())
     6008        TextChecker::setAutomaticTextReplacementEnabled(!TextChecker::state().isAutomaticTextReplacementEnabled);
     6009}
     6010
     6011#endif
     6012
    59796013#if PLATFORM(MAC)
    59806014
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.h

    r206256 r206261  
    14241424    bool maybeInitializeSandboxExtensionHandle(const WebCore::URL&, SandboxExtension::Handle&);
    14251425
     1426#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     1427    void toggleSmartInsertDelete();
     1428    void toggleAutomaticQuoteSubstitution();
     1429    void toggleAutomaticLinkDetection();
     1430    void toggleAutomaticDashSubstitution();
     1431    void toggleAutomaticTextReplacement();
     1432#endif
     1433
    14261434#if PLATFORM(MAC)
    14271435    void substitutionsPanelIsShowing(bool&);
  • trunk/Source/WebKit2/UIProcess/WebPageProxy.messages.in

    r206256 r206261  
    342342    SubstitutionsPanelIsShowing() -> (bool isShowing)
    343343#endif
     344#if USE(AUTOMATIC_TEXT_REPLACEMENT)
     345    toggleSmartInsertDelete()
     346    toggleAutomaticQuoteSubstitution()
     347    toggleAutomaticLinkDetection()
     348    toggleAutomaticDashSubstitution()
     349    toggleAutomaticTextReplacement()
     350#endif
    344351#if PLATFORM(MAC)
    345352    # Autocorrection messages
  • trunk/Source/WebKit2/UIProcess/efl/TextCheckerEfl.cpp

    r203038 r206261  
    5757    return textCheckerState;
    5858}
     59   
     60static bool testingModeEnabled = false;
     61   
     62void TextChecker::setTestingMode(bool enabled)
     63{
     64    testingModeEnabled = enabled;
     65}
     66   
     67bool TextChecker::isTestingMode()
     68{
     69    return testingModeEnabled;
     70}
    5971
    6072bool TextChecker::isContinuousSpellCheckingAllowed()
  • trunk/Source/WebKit2/UIProcess/gtk/TextCheckerGtk.cpp

    r203038 r206261  
    6464    return checkerState();
    6565}
     66   
     67static bool testingModeEnabled = false;
     68   
     69void TextChecker::setTestingMode(bool enabled)
     70{
     71    testingModeEnabled = enabled;
     72}
     73
     74bool TextChecker::isTestingMode()
     75{
     76    return testingModeEnabled;
     77}
    6678
    6779#if ENABLE(SPELLCHECK)
  • trunk/Source/WebKit2/UIProcess/ios/TextCheckerIOS.mm

    r202185 r206261  
    8585    notImplemented();
    8686}
     87   
     88static bool testingModeEnabled = false;
     89   
     90void TextChecker::setTestingMode(bool enabled)
     91{
     92    testingModeEnabled = enabled;
     93}
     94   
     95bool TextChecker::isTestingMode()
     96{
     97    return testingModeEnabled;
     98}
     99
    87100
    88101static bool smartInsertDeleteEnabled;
  • trunk/Source/WebKit2/UIProcess/mac/TextCheckerMac.mm

    r203724 r206261  
    116116    return textCheckerState;
    117117}
     118   
     119static bool testingModeEnabled = false;
     120
     121void TextChecker::setTestingMode(bool enabled)
     122{
     123    if (enabled && !testingModeEnabled) {
     124        [[NSUserDefaults standardUserDefaults] setBool:textCheckerState.isContinuousSpellCheckingEnabled forKey:WebContinuousSpellCheckingEnabled];
     125        [[NSUserDefaults standardUserDefaults] setBool:textCheckerState.isGrammarCheckingEnabled forKey:WebGrammarCheckingEnabled];
     126        [[NSUserDefaults standardUserDefaults] setBool:textCheckerState.isAutomaticSpellingCorrectionEnabled forKey:WebAutomaticSpellingCorrectionEnabled];
     127        [[NSUserDefaults standardUserDefaults] setBool:textCheckerState.isAutomaticQuoteSubstitutionEnabled forKey:WebAutomaticQuoteSubstitutionEnabled];
     128        [[NSUserDefaults standardUserDefaults] setBool:textCheckerState.isAutomaticDashSubstitutionEnabled forKey:WebAutomaticDashSubstitutionEnabled];
     129        [[NSUserDefaults standardUserDefaults] setBool:textCheckerState.isAutomaticLinkDetectionEnabled forKey:WebAutomaticLinkDetectionEnabled];
     130        [[NSUserDefaults standardUserDefaults] setBool:textCheckerState.isAutomaticTextReplacementEnabled forKey:WebAutomaticTextReplacementEnabled];
     131        [[NSUserDefaults standardUserDefaults] setBool:isSmartInsertDeleteEnabled() forKey:WebSmartInsertDeleteEnabled];
     132    }
     133    testingModeEnabled = enabled;
     134}
     135
     136bool TextChecker::isTestingMode()
     137{
     138    return testingModeEnabled;
     139}
    118140
    119141bool TextChecker::isContinuousSpellCheckingAllowed()
     
    138160                                                                                     
    139161    textCheckerState.isContinuousSpellCheckingEnabled = isContinuousSpellCheckingEnabled;
    140     [[NSUserDefaults standardUserDefaults] setBool:isContinuousSpellCheckingEnabled forKey:WebContinuousSpellCheckingEnabled];
     162    if (!testingModeEnabled)
     163        [[NSUserDefaults standardUserDefaults] setBool:isContinuousSpellCheckingEnabled forKey:WebContinuousSpellCheckingEnabled];
    141164
    142165    // FIXME: preflight the spell checker.
     
    149172
    150173    textCheckerState.isGrammarCheckingEnabled = isGrammarCheckingEnabled;
    151     [[NSUserDefaults standardUserDefaults] setBool:isGrammarCheckingEnabled forKey:WebGrammarCheckingEnabled];   
     174    if (!testingModeEnabled)
     175        [[NSUserDefaults standardUserDefaults] setBool:isGrammarCheckingEnabled forKey:WebGrammarCheckingEnabled];
    152176    [[NSSpellChecker sharedSpellChecker] updatePanels];
    153177   
     
    162186
    163187    textCheckerState.isAutomaticSpellingCorrectionEnabled = isAutomaticSpellingCorrectionEnabled;
    164     [[NSUserDefaults standardUserDefaults] setBool:isAutomaticSpellingCorrectionEnabled forKey:WebAutomaticSpellingCorrectionEnabled];   
     188    if (!testingModeEnabled)
     189        [[NSUserDefaults standardUserDefaults] setBool:isAutomaticSpellingCorrectionEnabled forKey:WebAutomaticSpellingCorrectionEnabled];
    165190
    166191    [[NSSpellChecker sharedSpellChecker] updatePanels];
     
    173198
    174199    textCheckerState.isAutomaticQuoteSubstitutionEnabled = isAutomaticQuoteSubstitutionEnabled;
    175     [[NSUserDefaults standardUserDefaults] setBool:isAutomaticQuoteSubstitutionEnabled forKey:WebAutomaticQuoteSubstitutionEnabled];   
     200    if (!testingModeEnabled)
     201        [[NSUserDefaults standardUserDefaults] setBool:isAutomaticQuoteSubstitutionEnabled forKey:WebAutomaticQuoteSubstitutionEnabled];
    176202   
    177203    [[NSSpellChecker sharedSpellChecker] updatePanels];
     
    184210
    185211    textCheckerState.isAutomaticDashSubstitutionEnabled = isAutomaticDashSubstitutionEnabled;
    186     [[NSUserDefaults standardUserDefaults] setBool:isAutomaticDashSubstitutionEnabled forKey:WebAutomaticDashSubstitutionEnabled];
     212    if (!testingModeEnabled)
     213        [[NSUserDefaults standardUserDefaults] setBool:isAutomaticDashSubstitutionEnabled forKey:WebAutomaticDashSubstitutionEnabled];
    187214
    188215    [[NSSpellChecker sharedSpellChecker] updatePanels];
     
    195222   
    196223    textCheckerState.isAutomaticLinkDetectionEnabled = isAutomaticLinkDetectionEnabled;
    197     [[NSUserDefaults standardUserDefaults] setBool:isAutomaticLinkDetectionEnabled forKey:WebAutomaticLinkDetectionEnabled];
     224    if (!testingModeEnabled)
     225        [[NSUserDefaults standardUserDefaults] setBool:isAutomaticLinkDetectionEnabled forKey:WebAutomaticLinkDetectionEnabled];
    198226   
    199227    [[NSSpellChecker sharedSpellChecker] updatePanels];
     
    206234   
    207235    textCheckerState.isAutomaticTextReplacementEnabled = isAutomaticTextReplacementEnabled;
    208     [[NSUserDefaults standardUserDefaults] setBool:isAutomaticTextReplacementEnabled forKey:WebAutomaticTextReplacementEnabled];
     236    if (!testingModeEnabled)
     237        [[NSUserDefaults standardUserDefaults] setBool:isAutomaticTextReplacementEnabled forKey:WebAutomaticTextReplacementEnabled];
    209238
    210239    [[NSSpellChecker sharedSpellChecker] updatePanels];
     
    233262    smartInsertDeleteEnabled = flag;
    234263
    235     [[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebSmartInsertDeleteEnabled];
     264    if (!testingModeEnabled)
     265        [[NSUserDefaults standardUserDefaults] setBool:flag forKey:WebSmartInsertDeleteEnabled];
    236266}
    237267
  • trunk/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj

    r205459 r206261  
    750750                31D5929E166E060000E6BF02 /* WebPlugInClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 31D5929C166E05FF00E6BF02 /* WebPlugInClient.cpp */; };
    751751                31D5929F166E060000E6BF02 /* WebPlugInClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 31D5929D166E060000E6BF02 /* WebPlugInClient.h */; };
     752                31D755C11D91B81500843BD1 /* WKTextChecker.h in Headers */ = {isa = PBXBuildFile; fileRef = 314888FF1D91B11D00377042 /* WKTextChecker.h */; settings = {ATTRIBUTES = (Private, ); }; };
     753                31D755C21D91B81B00843BD1 /* WKTextChecker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 314888FE1D91B11D00377042 /* WKTextChecker.cpp */; };
    752754                31EA25D2134F78C0005B1452 /* NativeWebMouseEventMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 31EA25D0134F78B2005B1452 /* NativeWebMouseEventMac.mm */; };
    753755                330934471315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 330934431315B9220097A7BC /* WebCookieManagerMessageReceiver.cpp */; };
     
    27702772                3131261C148FF82B00BA2A39 /* WebNotificationManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNotificationManager.h; sourceTree = "<group>"; };
    27712773                3131261D148FF82C00BA2A39 /* WebNotificationManager.messages.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = WebNotificationManager.messages.in; sourceTree = "<group>"; };
     2774                314888FE1D91B11D00377042 /* WKTextChecker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKTextChecker.cpp; sourceTree = "<group>"; };
     2775                314888FF1D91B11D00377042 /* WKTextChecker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKTextChecker.h; sourceTree = "<group>"; };
    27722776                31607F3819627002009B87DA /* LegacySessionStateCoding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LegacySessionStateCoding.h; sourceTree = "<group>"; };
    27732777                317FE7C11C487A6600A0CA89 /* APIExperimentalFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = APIExperimentalFeature.cpp; sourceTree = "<group>"; };
     
    62776281                        isa = PBXGroup;
    62786282                        children = (
     6283                                314888FE1D91B11D00377042 /* WKTextChecker.cpp */,
     6284                                314888FF1D91B11D00377042 /* WKTextChecker.h */,
    62796285                                5123CF18133D25E60056F800 /* cg */,
    62806286                                6EE849C41368D9040038D481 /* mac */,
     
    75667572                                1AAF0C4A12B16334008E49E2 /* ArgumentCodersCF.h in Headers */,
    75677573                                E179FD9C134D38060015B883 /* ArgumentCodersMac.h in Headers */,
     7574                                31D755C11D91B81500843BD1 /* WKTextChecker.h in Headers */,
    75687575                                CE1A0BD21A48E6C60054EF74 /* AssertionServicesSPI.h in Headers */,
    75697576                                C59C4A5918B81174007BDCB6 /* AssistedNodeInformation.h in Headers */,
     
    93399346                                2DA944AD1884E9BA00ED86DB /* TextCheckerIOS.mm in Sources */,
    93409347                                1AA417EF12C00D87002BE67B /* TextCheckerMac.mm in Sources */,
     9348                                31D755C21D91B81B00843BD1 /* WKTextChecker.cpp in Sources */,
    93419349                                1AAF263814687C39004A1E8A /* TiledCoreAnimationDrawingArea.mm in Sources */,
    93429350                                1AF05D8614688348008B1E81 /* TiledCoreAnimationDrawingAreaProxy.mm in Sources */,
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp

    r205379 r206261  
    156156}
    157157
    158 void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
    159 {
    160     toImpl(bundleRef)->setAutomaticLinkDetectionEnabled(toImpl(pageGroupRef), enabled);
    161 }
    162 
    163158void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled)
    164159{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h

    r205379 r206261  
    5050WK_EXPORT void WKBundleSetPluginsEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    5151WK_EXPORT void WKBundleSetJavaScriptCanAccessClipboard(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    52 WK_EXPORT void WKBundleSetAutomaticLinkDetectionEnabled(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, bool enabled);
    5352WK_EXPORT void WKBundleSetPrivateBrowsingEnabled(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
    5453WK_EXPORT void WKBundleSetUseDashboardCompatibilityMode(WKBundleRef bundle, WKBundlePageGroupRef pageGroup, bool enabled);
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp

    r205379 r206261  
    3232#include "NotificationPermissionRequestManager.h"
    3333#include "SessionTracker.h"
    34 #include "TextChecker.h"
    3534#include "UserData.h"
    3635#include "WKAPICast.h"
     
    305304}
    306305
    307 void InjectedBundle::setAutomaticLinkDetectionEnabled(WebPageGroupProxy* pageGroup, bool enabled)
    308 {
    309 #if USE(APPKIT)
    310     if (enabled == TextChecker::state().isAutomaticLinkDetectionEnabled)
    311         return;
    312     TextChecker::setAutomaticLinkDetectionEnabled(enabled);
    313     WebProcess::singleton().setTextCheckerState(TextChecker::state());
    314 #endif
    315 }
    316 
    317306void InjectedBundle::setPrivateBrowsingEnabled(WebPageGroupProxy* pageGroup, bool enabled)
    318307{
  • trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h

    r205379 r206261  
    107107    void setPluginsEnabled(WebPageGroupProxy*, bool);
    108108    void setJavaScriptCanAccessClipboard(WebPageGroupProxy*, bool);
    109     void setAutomaticLinkDetectionEnabled(WebPageGroupProxy*, bool enabled);
    110109    void setPrivateBrowsingEnabled(WebPageGroupProxy*, bool);
    111110    void setUseDashboardCompatibilityMode(WebPageGroupProxy*, bool);
  • trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm

    r204508 r206261  
    125125void WebEditorClient::toggleSmartInsertDelete()
    126126{
    127     // This is handled in the UI process.
    128     ASSERT_NOT_REACHED();
     127    m_page->send(Messages::WebPageProxy::toggleSmartInsertDelete());
    129128}
    130129
     
    139138void WebEditorClient::toggleAutomaticQuoteSubstitution()
    140139{
    141     // This is handled in the UI process.
    142     ASSERT_NOT_REACHED();
     140    m_page->send(Messages::WebPageProxy::toggleAutomaticQuoteSubstitution());
    143141}
    144142
     
    150148void WebEditorClient::toggleAutomaticLinkDetection()
    151149{
    152     // This is handled in the UI process.
    153     ASSERT_NOT_REACHED();
     150    m_page->send(Messages::WebPageProxy::toggleAutomaticLinkDetection());
    154151}
    155152
     
    164161void WebEditorClient::toggleAutomaticDashSubstitution()
    165162{
    166     // This is handled in the UI process.
    167     ASSERT_NOT_REACHED();
     163    m_page->send(Messages::WebPageProxy::toggleAutomaticDashSubstitution());
    168164}
    169165
     
    178174void WebEditorClient::toggleAutomaticTextReplacement()
    179175{
    180     // This is handled in the UI process.
    181     ASSERT_NOT_REACHED();
     176    m_page->send(Messages::WebPageProxy::toggleAutomaticTextReplacement());
    182177}
    183178
  • trunk/Tools/ChangeLog

    r206247 r206261  
     12016-09-22  Jonathan Bedard  <jbedard@apple.com>
     2
     3        Automatic Text Replacement Testing in WebKit2
     4        https://bugs.webkit.org/show_bug.cgi?id=161919
     5
     6        Reviewed by Ryosuke Niwa.
     7
     8        Implemented test hooks for text replacement for WebKit2.
     9        Note that spell checking has not been implemented, so most tests which use text replacement still fail.
     10
     11        * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Removed setAutomaticLinkDetectionEnabled from TestRunner, moved to Internals.
     12        * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp: Ditto.
     13        (WTR::InjectedBundle::beginTesting): Ditto.
     14        * WebKitTestRunner/InjectedBundle/TestRunner.cpp: Ditto.
     15        * WebKitTestRunner/InjectedBundle/TestRunner.h: Ditto.
     16        * WebKitTestRunner/TestController.cpp:
     17        (WTR::TestController::runTest): Place TextChecker into testing mode.
     18
    1192016-09-21  Dan Bernstein  <mitz@apple.com>
    220
  • trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl

    r205379 r206261  
    6363    void setPluginsEnabled(boolean value);
    6464    void setJavaScriptCanAccessClipboard(boolean value);
    65     void setAutomaticLinkDetectionEnabled(boolean value);
    6665    void setPrivateBrowsingEnabled(boolean value);
    6766    void setUseDashboardCompatibilityMode(boolean value);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp

    r205379 r206261  
    295295    WKBundleSetAllowUniversalAccessFromFileURLs(m_bundle, m_pageGroup, true);
    296296    WKBundleSetJavaScriptCanAccessClipboard(m_bundle, m_pageGroup, true);
    297     WKBundleSetAutomaticLinkDetectionEnabled(m_bundle, m_pageGroup, false);
    298297    WKBundleSetPrivateBrowsingEnabled(m_bundle, m_pageGroup, false);
    299298    WKBundleSetUseDashboardCompatibilityMode(m_bundle, m_pageGroup, false);
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp

    r205379 r206261  
    412412}
    413413
    414 void TestRunner::setAutomaticLinkDetectionEnabled(bool enabled)
    415 {
    416     auto& injectedBundle = InjectedBundle::singleton();
    417     WKBundleSetAutomaticLinkDetectionEnabled(injectedBundle.bundle(), injectedBundle.pageGroup(), enabled);
    418 }
    419 
    420414void TestRunner::setPrivateBrowsingEnabled(bool enabled)
    421415{
  • trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h

    r205379 r206261  
    110110    void setPluginsEnabled(bool);
    111111    void setJavaScriptCanAccessClipboard(bool);
    112     void setAutomaticLinkDetectionEnabled(bool);
    113112    void setPrivateBrowsingEnabled(bool);
    114113    void setUseDashboardCompatibilityMode(bool);
  • trunk/Tools/WebKitTestRunner/TestController.cpp

    r204853 r206261  
    5858#include <WebKit/WKRetainPtr.h>
    5959#include <WebKit/WKSecurityOriginRef.h>
     60#include <WebKit/WKTextChecker.h>
    6061#include <WebKit/WKUserMediaPermissionCheck.h>
    6162#include <algorithm>
     
    7980#include <WebKit/WKContextPrivateMac.h>
    8081#include <WebKit/WKPagePrivateMac.h>
    81 #endif
    82 
    83 #if !PLATFORM(COCOA)
    84 #include <WebKit/WKTextChecker.h>
    8582#endif
    8683
     
    10841081bool TestController::runTest(const char* inputLine)
    10851082{
     1083    WKTextCheckerSetTestingMode(true);
    10861084    TestCommand command = parseInputLine(std::string(inputLine));
    10871085
Note: See TracChangeset for help on using the changeset viewer.