Skip to content

Commit 717abb5

Browse files
committed
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. Canonical link: https://commits.webkit.org/238367@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278334 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 3873e39 commit 717abb5

2 files changed

Lines changed: 14 additions & 13 deletions

File tree

Tools/ChangeLog

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,17 @@
1+
2021-06-01 Chris Fleizach <[email protected]>
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+
115
2021-06-01 Jonathan Bedard <[email protected]>
216

317
[run-webkit-tests] Move helper out of Port instance

Tools/TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
#define ACCESSIBILITY_DOMAIN CFSTR("com.apple.universalaccess")
5858
#endif
5959

60-
static bool reduceMotionNotificationReceived = false;
6160
static bool receivedPreferenceNotification = false;
6261

6362
@interface WKPreferenceObserverForTesting : WKPreferenceObserver
@@ -72,15 +71,8 @@ - (void)preferenceDidChange:(NSString *)domain key:(NSString *)key encodedValue:
7271
}
7372
@end
7473

75-
static void notificationCallback(CFNotificationCenterRef center, void *observer, CFNotificationName name, const void *object, CFDictionaryRef userInfo)
76-
{
77-
reduceMotionNotificationReceived = true;
78-
}
79-
8074
TEST(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]);
8678

@@ -96,20 +88,15 @@ static void notificationCallback(CFNotificationCenterRef center, void *observer,
9688

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"];
10796

10897
ASSERT_TRUE(reduceMotion());
10998

11099
CFPreferencesSetAppValue(REDUCED_MOTION_PREFERENCE, nullptr, ACCESSIBILITY_DOMAIN);
111-
112-
CFNotificationCenterRemoveObserver(NOTIFICATION_CENTER, nullptr, REDUCED_MOTION_CHANGED_NOTIFICATION, nullptr);
113100
}
114101

115102
#endif

0 commit comments

Comments
 (0)