Title: [278334] trunk/Tools
Revision
278334
Author
[email protected]
Date
2021-06-01 17:27:45 -0700 (Tue, 01 Jun 2021)

Log 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.

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (278333 => 278334)


--- trunk/Tools/ChangeLog	2021-06-02 00:14:56 UTC (rev 278333)
+++ trunk/Tools/ChangeLog	2021-06-02 00:27:45 UTC (rev 278334)
@@ -1,3 +1,17 @@
+2021-06-01  Chris Fleizach  <[email protected]>
+
+        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.
+
 2021-06-01  Jonathan Bedard  <[email protected]>
 
         [run-webkit-tests] Move helper out of Port instance

Modified: trunk/Tools/TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm (278333 => 278334)


--- trunk/Tools/TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm	2021-06-02 00:14:56 UTC (rev 278333)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKit/AccessibilityReduceMotion.mm	2021-06-02 00:27:45 UTC (rev 278334)
@@ -57,7 +57,6 @@
 #define ACCESSIBILITY_DOMAIN CFSTR("com.apple.universalaccess")
 #endif
 
-static bool reduceMotionNotificationReceived = false;
 static bool receivedPreferenceNotification = false;
 
 @interface WKPreferenceObserverForTesting : WKPreferenceObserver
@@ -72,15 +71,8 @@
 }
 @end
 
-static void notificationCallback(CFNotificationCenterRef center, void *observer, CFNotificationName name, const void *object, CFDictionaryRef userInfo)
-{
-    reduceMotionNotificationReceived = true;
-}
-
 TEST(WebKit, AccessibilityReduceMotion)
 {
-    CFNotificationCenterAddObserver(NOTIFICATION_CENTER, nullptr, &notificationCallback, REDUCED_MOTION_CHANGED_NOTIFICATION, nullptr, CFNotificationSuspensionBehaviorDeliverImmediately);
-
     WKWebViewConfiguration *configuration = [WKWebViewConfiguration _test_configurationWithTestPlugInClassName:@"WebProcessPlugInWithInternals" configureJSCForTesting:YES];
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 300, 300) configuration:configuration addToWindow:YES]);
 
@@ -96,12 +88,9 @@
 
     ASSERT_FALSE(reduceMotion());
 
-    reduceMotionNotificationReceived = false;
-
     CFPreferencesSetAppValue(REDUCED_MOTION_PREFERENCE, kCFBooleanTrue, ACCESSIBILITY_DOMAIN);
 
     TestWebKitAPI::Util::run(&receivedPreferenceNotification);
-    TestWebKitAPI::Util::run(&reduceMotionNotificationReceived);
 
     [webView synchronouslyLoadTestPageNamed:@"simple"];
 
@@ -108,8 +97,6 @@
     ASSERT_TRUE(reduceMotion());
 
     CFPreferencesSetAppValue(REDUCED_MOTION_PREFERENCE, nullptr, ACCESSIBILITY_DOMAIN);
-
-    CFNotificationCenterRemoveObserver(NOTIFICATION_CENTER, nullptr, REDUCED_MOTION_CHANGED_NOTIFICATION, nullptr);
 }
 
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to