Changeset 238340 in webkit


Ignore:
Timestamp:
Nov 16, 2018 8:23:30 PM (5 years ago)
Author:
rniwa@webkit.org
Message:

REGRESSION (r238294): TestWebKitAPI.WKNavigation.ProcessCrashDuringCallback failing on iOS
https://bugs.webkit.org/show_bug.cgi?id=191783

Reviewed by Chris Dumez.

Allow either WKErrorWebContentProcessTerminated or WKErrorWebViewInvalidated since the test
is closing WebView, thereby invalidating the view, which is racing with the process termination.

  • TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:

(TEST):

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r238339 r238340  
     12018-11-16  Ryosuke Niwa  <rniwa@webkit.org>
     2
     3        REGRESSION (r238294): TestWebKitAPI.WKNavigation.ProcessCrashDuringCallback failing on iOS
     4        https://bugs.webkit.org/show_bug.cgi?id=191783
     5
     6        Reviewed by Chris Dumez.
     7
     8        Allow either WKErrorWebContentProcessTerminated or WKErrorWebViewInvalidated since the test
     9        is closing WebView, thereby invalidating the view, which is racing with the process termination.
     10
     11        * TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm:
     12        (TEST):
     13
    1142018-11-16  Chris Dumez  <cdumez@apple.com>
    215
  • trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/WebContentProcessDidTerminate.mm

    r235509 r238340  
    231231    [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
    232232        if (!!error)
    233             EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code);
    234         ++callbackCount;
    235         if (callbackCount == 6)
    236             calledAllCallbacks = true;
    237     }];
    238     [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
    239         if (!!error)
    240             EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code);
    241         ++callbackCount;
    242         if (callbackCount == 6)
    243             calledAllCallbacks = true;
    244     }];
    245     [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
    246         if (!!error)
    247             EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code);
     233            EXPECT_TRUE(error.code == WKErrorWebContentProcessTerminated || error.code == WKErrorWebViewInvalidated);
     234        ++callbackCount;
     235        if (callbackCount == 6)
     236            calledAllCallbacks = true;
     237    }];
     238    [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
     239        if (!!error)
     240            EXPECT_TRUE(error.code == WKErrorWebContentProcessTerminated || error.code == WKErrorWebViewInvalidated);
     241        ++callbackCount;
     242        if (callbackCount == 6)
     243            calledAllCallbacks = true;
     244    }];
     245    [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
     246        if (!!error)
     247            EXPECT_TRUE(error.code == WKErrorWebContentProcessTerminated || error.code == WKErrorWebViewInvalidated);
    248248        [view _close]; // Calling _close will also invalidate all callbacks.
    249249        ++callbackCount;
     
    253253    [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
    254254        if (!!error)
    255             EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code);
    256         ++callbackCount;
    257         if (callbackCount == 6)
    258             calledAllCallbacks = true;
    259     }];
    260     [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
    261         if (!!error)
    262             EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code);
    263         ++callbackCount;
    264         if (callbackCount == 6)
    265             calledAllCallbacks = true;
    266     }];
    267     [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
    268         if (!!error)
    269             EXPECT_EQ(WKErrorWebContentProcessTerminated, error.code);
     255            EXPECT_TRUE(error.code == WKErrorWebContentProcessTerminated || error.code == WKErrorWebViewInvalidated);
     256        ++callbackCount;
     257        if (callbackCount == 6)
     258            calledAllCallbacks = true;
     259    }];
     260    [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
     261        if (!!error)
     262            EXPECT_TRUE(error.code == WKErrorWebContentProcessTerminated || error.code == WKErrorWebViewInvalidated);
     263        ++callbackCount;
     264        if (callbackCount == 6)
     265            calledAllCallbacks = true;
     266    }];
     267    [webView _getContentsAsStringWithCompletionHandler:^(NSString *contents, NSError *error) {
     268        if (!!error)
     269            EXPECT_TRUE(error.code == WKErrorWebContentProcessTerminated || error.code == WKErrorWebViewInvalidated);
    270270        ++callbackCount;
    271271        if (callbackCount == 6)
Note: See TracChangeset for help on using the changeset viewer.