Changeset 167491 in webkit


Ignore:
Timestamp:
Apr 18, 2014 10:08:07 AM (10 years ago)
Author:
ap@apple.com
Message:

[Mac] AttributedStringTest API tests fail with async text input
https://bugs.webkit.org/show_bug.cgi?id=131833

Reviewed by Enrica Casucci.

Don't run sync NSTextInputClient tests where we don't implement these calls.

  • TestWebKitAPI/Tests/mac/AttributedString.mm:

(TestWebKitAPI::AttributedStringTest_CustomFont::didLoadURL):
(TestWebKitAPI::AttributedStringTest_CustomFont::runSyncTest):
(TestWebKitAPI::AttributedStringTest_Strikethrough::didLoadURL):
(TestWebKitAPI::AttributedStringTest_Strikethrough::runSyncTest):
(TestWebKitAPI::AttributedStringTest_CustomFont::runTest): Deleted.
(TestWebKitAPI::AttributedStringTest_Strikethrough::runTest): Deleted.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r167488 r167491  
     12014-04-17  Alexey Proskuryakov  <ap@apple.com>
     2
     3        [Mac] AttributedStringTest API tests fail with async text input
     4        https://bugs.webkit.org/show_bug.cgi?id=131833
     5
     6        Reviewed by Enrica Casucci.
     7
     8        Don't run sync NSTextInputClient tests where we don't implement these calls.
     9
     10        * TestWebKitAPI/Tests/mac/AttributedString.mm:
     11        (TestWebKitAPI::AttributedStringTest_CustomFont::didLoadURL):
     12        (TestWebKitAPI::AttributedStringTest_CustomFont::runSyncTest):
     13        (TestWebKitAPI::AttributedStringTest_Strikethrough::didLoadURL):
     14        (TestWebKitAPI::AttributedStringTest_Strikethrough::runSyncTest):
     15        (TestWebKitAPI::AttributedStringTest_CustomFont::runTest): Deleted.
     16        (TestWebKitAPI::AttributedStringTest_Strikethrough::runTest): Deleted.
     17
    1182014-04-18  Philippe Normand  <pnormand@igalia.com>
    219
  • trunk/Tools/TestWebKitAPI/Tests/mac/AttributedString.mm

    r153344 r167491  
    3939}
    4040
     41#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
    4142static NSAttributedString *attributedString(WKView *wkView, NSRange range)
    4243{
     
    4445    return [wkView attributedSubstringForProposedRange:range actualRange:&actualRange];
    4546}
    46 
     47#endif
    4748
    4849class AttributedStringTest_CustomFont : public WebKitAgnosticTest {
    4950public:
    50     template <typename View> void runTest(View);
     51    template <typename View> void runSyncTest(View);
    5152
    5253    // WebKitAgnosticTest
    53     virtual void didLoadURL(WebView *webView) { runTest(webView); }
    54     virtual void didLoadURL(WKView *wkView) { runTest(wkView); }
     54    virtual void didLoadURL(WebView *webView) { runSyncTest(webView); }
     55#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
     56    virtual void didLoadURL(WKView *wkView) { runSyncTest(wkView); }
     57#else
     58    // FIXME: Reimplement the test using async NSTextInputClient interface.
     59    virtual void didLoadURL(WKView *wkView) { }
     60#endif
    5561
    5662    virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@"attributedStringCustomFont" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; }
     
    5864
    5965template <typename View>
    60 void AttributedStringTest_CustomFont::runTest(View view)
     66void AttributedStringTest_CustomFont::runSyncTest(View view)
    6167{
    6268    NSAttributedString *attrString = attributedString(view, NSMakeRange(0, 5));
     
    6975}
    7076
     77#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
    7178TEST_F(AttributedStringTest_CustomFont, WebKit2)
    7279{
    7380    runWebKit2Test();
    7481}
     82#endif
    7583
    7684class AttributedStringTest_Strikethrough : public WebKitAgnosticTest {
    7785public:
    78     template <typename View> void runTest(View);
     86    template <typename View> void runSyncTest(View);
    7987
    8088    // WebKitAgnosticTest
    81     virtual void didLoadURL(WebView *webView) { runTest(webView); }
    82     virtual void didLoadURL(WKView *wkView) { runTest(wkView); }
     89    virtual void didLoadURL(WebView *webView) { runSyncTest(webView); }
     90#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
     91    virtual void didLoadURL(WKView *wkView) { runSyncTest(wkView); }
     92#else
     93    // FIXME: Reimplement the test using async NSTextInputClient interface.
     94    virtual void didLoadURL(WKView *wkView) { }
     95#endif
    8396
    8497    virtual NSURL *url() const { return [[NSBundle mainBundle] URLForResource:@"attributedStringStrikethrough" withExtension:@"html" subdirectory:@"TestWebKitAPI.resources"]; }
     
    8699
    87100template <typename View>
    88 void AttributedStringTest_Strikethrough::runTest(View view)
     101void AttributedStringTest_Strikethrough::runSyncTest(View view)
    89102{
    90103    NSAttributedString *attrString = attributedString(view, NSMakeRange(0, 5));
     
    103116}
    104117
     118#if __MAC_OS_X_VERSION_MIN_REQUIRED <= 1090
    105119TEST_F(AttributedStringTest_Strikethrough, WebKit2)
    106120{
    107121    runWebKit2Test();
    108122}
     123#endif
    109124
    110125} // namespace TestWebKitAPI
Note: See TracChangeset for help on using the changeset viewer.