Changeset 254699 in webkit


Ignore:
Timestamp:
Jan 16, 2020, 11:27:43 AM (5 years ago)
Author:
Simon Fraser
Message:

fast/forms/ios/zoom-after-input-tap-wide-input.html is timing out
https://bugs.webkit.org/show_bug.cgi?id=206313

Reviewed by Wenson Hsieh.

The timeout was caused by the previous test, fast/forms/ios/validation-bubble-dismiss-on-tap.html,
which puts up a validation bubble whose implementation involves showing a modal UIViewController.
That view controller disappears with an animation, which happened after we're proceeded to the next
test, and the overlay view could intercept touches thus breaking any subsequent touch-based test.

Fix by having platformResetStateToConsistentValues() wait for the presentedViewController to
go to nil, which requires spinning the runloop.

platformResetStateToConsistentValues() will return false if we fail to remove the presented view controller,
which will trigger a timeout with a log.

  • WebKitTestRunner/TestController.cpp:

(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/TestController.h:
  • WebKitTestRunner/cocoa/TestControllerCocoa.mm:

(WTR::TestController::cocoaResetStateToConsistentValues):

  • WebKitTestRunner/ios/TestControllerIOS.mm:

(WTR::TestController::platformResetStateToConsistentValues):

  • WebKitTestRunner/mac/TestControllerMac.mm:

(WTR::TestController::platformResetStateToConsistentValues):

Location:
trunk/Tools
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/Tools/ChangeLog

    r254682 r254699  
     12020-01-16  Simon Fraser  <simon.fraser@apple.com>
     2
     3        fast/forms/ios/zoom-after-input-tap-wide-input.html is timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=206313
     5
     6        Reviewed by Wenson Hsieh.
     7       
     8        The timeout was caused by the previous test, fast/forms/ios/validation-bubble-dismiss-on-tap.html,
     9        which puts up a validation bubble whose implementation involves showing a modal UIViewController.
     10        That view controller disappears with an animation, which happened after we're proceeded to the next
     11        test, and the overlay view could intercept touches thus breaking any subsequent touch-based test.
     12
     13        Fix by having platformResetStateToConsistentValues() wait for the presentedViewController to
     14        go to nil, which requires spinning the runloop.
     15
     16        platformResetStateToConsistentValues() will return false if we fail to remove the presented view controller,
     17        which will trigger a timeout with a log.
     18
     19        * WebKitTestRunner/TestController.cpp:
     20        (WTR::TestController::resetStateToConsistentValues):
     21        (WTR::TestController::platformResetStateToConsistentValues):
     22        * WebKitTestRunner/TestController.h:
     23        * WebKitTestRunner/cocoa/TestControllerCocoa.mm:
     24        (WTR::TestController::cocoaResetStateToConsistentValues):
     25        * WebKitTestRunner/ios/TestControllerIOS.mm:
     26        (WTR::TestController::platformResetStateToConsistentValues):
     27        * WebKitTestRunner/mac/TestControllerMac.mm:
     28        (WTR::TestController::platformResetStateToConsistentValues):
     29
    1302020-01-16  Philippe Normand  <philn@igalia.com>
    231
  • TabularUnified trunk/Tools/WebKitTestRunner/TestController.cpp

    r254473 r254699  
    10871087    setHidden(false);
    10881088
    1089     platformResetStateToConsistentValues(options);
     1089    if (!platformResetStateToConsistentValues(options))
     1090        return false;
    10901091
    10911092    m_shouldDecideNavigationPolicyAfterDelay = false;
     
    30873088}
    30883089
    3089 void TestController::platformResetStateToConsistentValues(const TestOptions&)
    3090 {
     3090bool TestController::platformResetStateToConsistentValues(const TestOptions&)
     3091{
     3092    return true;
    30913093}
    30923094
  • TabularUnified trunk/Tools/WebKitTestRunner/TestController.h

    r254052 r254699  
    359359    static PlatformWebView* platformCreateOtherPage(PlatformWebView* parentView, WKPageConfigurationRef, const TestOptions&);
    360360    void platformResetPreferencesToConsistentValues();
    361     void platformResetStateToConsistentValues(const TestOptions&);
     361    // Returns false if the reset timed out.
     362    bool platformResetStateToConsistentValues(const TestOptions&);
    362363#if PLATFORM(COCOA)
    363364    void cocoaPlatformInitialize();
  • TabularUnified trunk/Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm

    r254342 r254699  
    263263    }
    264264
    265     [globalWebsiteDataStoreDelegateClient setAllowRaisingQuota: true];
     265    [globalWebsiteDataStoreDelegateClient setAllowRaisingQuota:YES];
    266266}
    267267
  • TabularUnified trunk/Tools/WebKitTestRunner/ios/TestControllerIOS.mm

    r254318 r254699  
    143143}
    144144
    145 void TestController::platformResetStateToConsistentValues(const TestOptions& options)
     145bool TestController::platformResetStateToConsistentValues(const TestOptions& options)
    146146{
    147147    cocoaResetStateToConsistentValues(options);
     
    194194    runUntil(isDoneWaitingForMenuToDismiss, m_currentInvocation->shortTimeout());
    195195
     196    if (PlatformWebView* platformWebView = mainWebView()) {
     197        TestRunnerWKWebView *webView = platformWebView->platformView();
     198        UIViewController *webViewController = [[webView window] rootViewController];
     199
     200        MonotonicTime waitEndTime = MonotonicTime::now() + m_currentInvocation->shortTimeout();
     201       
     202        bool hasPresentedViewController = !![webViewController presentedViewController];
     203        while (hasPresentedViewController && MonotonicTime::now() < waitEndTime) {
     204            [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantPast]];
     205            hasPresentedViewController = !![webViewController presentedViewController];
     206        }
     207       
     208        if (hasPresentedViewController) {
     209            TestInvocation::dumpWebProcessUnresponsiveness("TestController::platformResetPreferencesToConsistentValues - Failed to remove presented view controller\n");
     210            return false;
     211        }
     212    }
     213
    196214    if (shouldRestoreFirstResponder)
    197215        [mainWebView()->platformView() becomeFirstResponder];
     216
     217    return true;
    198218}
    199219
  • TabularUnified trunk/Tools/WebKitTestRunner/mac/TestControllerMac.mm

    r254318 r254699  
    111111}
    112112
    113 void TestController::platformResetStateToConsistentValues(const TestOptions& options)
     113bool TestController::platformResetStateToConsistentValues(const TestOptions& options)
    114114{
    115115    cocoaResetStateToConsistentValues(options);
     
    118118        // Clear out (and ignore) any pending gesture and scroll wheel events.
    119119    }
     120   
     121    return true;
    120122}
    121123
Note: See TracChangeset for help on using the changeset viewer.