⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 278334 in webkit


Ignore:
Timestamp:
Jun 1, 2021, 5:27:45 PM (5 years ago)
Author:
Chris Fleizach
Message:

REGRESSION: (r277971) TestWebKitAPI.WebKit.AccessibilityReduceMotion is timing out
https://bugs.webkit.org/show_bug.cgi?id=226505
<rdar://problem/78721462>

Reviewed by Darin Adler.

The distributed notification for RM is no longer re-posted within WebKit, so we don't need to listen for it.

  • TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm:

(TEST):
(notificationCallback): Deleted.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r278332 r278334  
     12021-06-01  Chris Fleizach  <cfleizach@apple.com>
     2
     3        REGRESSION: (r277971) TestWebKitAPI.WebKit.AccessibilityReduceMotion is timing out
     4        https://bugs.webkit.org/show_bug.cgi?id=226505
     5        <rdar://problem/78721462>
     6
     7        Reviewed by Darin Adler.
     8
     9        The distributed notification for RM is no longer re-posted within WebKit, so we don't need to listen for it.
     10
     11        * TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm:
     12        (TEST):
     13        (notificationCallback): Deleted.
     14
    1152021-06-01  Jonathan Bedard  <jbedard@apple.com>
    216
  • trunk/Tools/TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm

    r277209 r278334  
    5858#endif
    5959
    60 static bool reduceMotionNotificationReceived = false;
    6160static bool receivedPreferenceNotification = false;
    6261
     
    7372@end
    7473
    75 static void notificationCallback(CFNotificationCenterRef center, void *observer, CFNotificationName name, const void *object, CFDictionaryRef userInfo)
    76 {
    77     reduceMotionNotificationReceived = true;
    78 }
    79 
    8074TEST(WebKit, AccessibilityReduceMotion)
    8175{
    82     CFNotificationCenterAddObserver(NOTIFICATION_CENTER, nullptr, &notificationCallback, REDUCED_MOTION_CHANGED_NOTIFICATION, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately);
    83 
    8476    WKWebViewConfiguration *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
    8577    auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 300, 300) configuration:configuration addToWindow:YES]);
     
    9789    ASSERT_FALSE(reduceMotion());
    9890
    99     reduceMotionNotificationReceived = false;
    100 
    10191    CFPreferencesSetAppValue(REDUCED_MOTION_PREFERENCE, kCFBooleanTrue, ACCESSIBILITY_DOMAIN);
    10292
    10393    TestWebKitAPI::Util::run(&receivedPreferenceNotification);
    104     TestWebKitAPI::Util::run(&reduceMotionNotificationReceived);
    10594
    10695    [webView synchronouslyLoadTestPageNamed:@"simple"];
     
    10998
    11099    CFPreferencesSetAppValue(REDUCED_MOTION_PREFERENCE, nullptr, ACCESSIBILITY_DOMAIN);
    111 
    112     CFNotificationCenterRemoveObserver(NOTIFICATION_CENTER, nullptr, REDUCED_MOTION_CHANGED_NOTIFICATION, nullptr);
    113100}
    114101
Note: See TracChangeset for help on using the changeset viewer.