Title: [292401] trunk
Revision
292401
Author
eric.carl...@apple.com
Date
2022-04-05 10:38:45 -0700 (Tue, 05 Apr 2022)

Log Message

5 Media API tests are flakily timing out on iOS14
https://bugs.webkit.org/show_bug.cgi?id=230321
<rdar://problem/83168970>

Reviewed by Jer Noble.

Source/WebKit:

Un-skipped API test WKWebViewPausePlayingAudioTests.OutOfWindow

* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationWillEnterForegroundForMedia): Log the correct name.

* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationDidEnterBackgroundForMedia): Call PlatformMediaSessionManager.
(WebKit::WebPage::applicationWillEnterForegroundForMedia): Ditto.

Tools:

* TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm:
(TestWebKitAPI::TEST):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (292400 => 292401)


--- trunk/Source/WebKit/ChangeLog	2022-04-05 17:04:57 UTC (rev 292400)
+++ trunk/Source/WebKit/ChangeLog	2022-04-05 17:38:45 UTC (rev 292401)
@@ -1,3 +1,20 @@
+2022-04-05  Eric Carlson  <eric.carl...@apple.com>
+
+        5 Media API tests are flakily timing out on iOS14
+        https://bugs.webkit.org/show_bug.cgi?id=230321
+        <rdar://problem/83168970>
+
+        Reviewed by Jer Noble.
+
+        Un-skipped API test WKWebViewPausePlayingAudioTests.OutOfWindow
+
+        * UIProcess/ios/WebPageProxyIOS.mm:
+        (WebKit::WebPageProxy::applicationWillEnterForegroundForMedia): Log the correct name.
+
+        * WebProcess/WebPage/ios/WebPageIOS.mm:
+        (WebKit::WebPage::applicationDidEnterBackgroundForMedia): Call PlatformMediaSessionManager.
+        (WebKit::WebPage::applicationWillEnterForegroundForMedia): Ditto.
+
 2022-04-05  Simon Fraser  <simon.fra...@apple.com>
 
         Pass an IOSurfacePool to ImageBuffer::releaseBufferToPool()

Modified: trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm (292400 => 292401)


--- trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2022-04-05 17:04:57 UTC (rev 292400)
+++ trunk/Source/WebKit/UIProcess/ios/WebPageProxyIOS.mm	2022-04-05 17:38:45 UTC (rev 292401)
@@ -672,7 +672,7 @@
 void WebPageProxy::applicationWillEnterForegroundForMedia()
 {
     bool isSuspendedUnderLock = [UIApp isSuspendedUnderLock];
-    WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationDidEnterBackgroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);
+    WEBPAGEPROXY_RELEASE_LOG(ViewState, "applicationWillEnterForegroundForMedia: isSuspendedUnderLock? %d", isSuspendedUnderLock);
 
     m_process->send(Messages::WebPage::ApplicationWillEnterForegroundForMedia(isSuspendedUnderLock), m_webPageID);
 }

Modified: trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm (292400 => 292401)


--- trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2022-04-05 17:04:57 UTC (rev 292400)
+++ trunk/Source/WebKit/WebProcess/WebPage/ios/WebPageIOS.mm	2022-04-05 17:38:45 UTC (rev 292401)
@@ -4042,12 +4042,14 @@
 
 void WebPage::applicationDidEnterBackgroundForMedia(bool isSuspendedUnderLock)
 {
-    [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationDidEnterBackgroundNotification object:nil userInfo:@{@"isSuspendedUnderLock": @(isSuspendedUnderLock)}];
+    if (auto* manager = PlatformMediaSessionManager::sharedManagerIfExists())
+        manager->applicationDidEnterBackground(isSuspendedUnderLock);
 }
 
 void WebPage::applicationWillEnterForegroundForMedia(bool isSuspendedUnderLock)
 {
-    [[NSNotificationCenter defaultCenter] postNotificationName:WebUIApplicationWillEnterForegroundNotification object:nil userInfo:@{@"isSuspendedUnderLock": @(isSuspendedUnderLock)}];
+    if (auto* manager = PlatformMediaSessionManager::sharedManagerIfExists())
+        manager->applicationWillEnterForeground(isSuspendedUnderLock);
 }
 
 static inline void adjustVelocityDataForBoundedScale(VelocityData& velocityData, double exposedRectScale, double minimumScale, double maximumScale)

Modified: trunk/Tools/ChangeLog (292400 => 292401)


--- trunk/Tools/ChangeLog	2022-04-05 17:04:57 UTC (rev 292400)
+++ trunk/Tools/ChangeLog	2022-04-05 17:38:45 UTC (rev 292401)
@@ -1,3 +1,14 @@
+2022-04-05  Eric Carlson  <eric.carl...@apple.com>
+
+        5 Media API tests are flakily timing out on iOS14
+        https://bugs.webkit.org/show_bug.cgi?id=230321
+        <rdar://problem/83168970>
+
+        Reviewed by Jer Noble.
+
+        * TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm:
+        (TestWebKitAPI::TEST):
+
 2022-04-05  Kimmo Kinnunen  <kkinnu...@apple.com>
 
         ANGLE changes.diff contains differences that are from stale files or unneeded

Modified: trunk/Tools/TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm (292400 => 292401)


--- trunk/Tools/TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm	2022-04-05 17:04:57 UTC (rev 292400)
+++ trunk/Tools/TestWebKitAPI/Tests/ios/WKWebViewPausePlayingAudioTests.mm	2022-04-05 17:38:45 UTC (rev 292401)
@@ -69,8 +69,6 @@
     Util::run(&isPlaying);
 }
 
-// FIXME: Re-enable this test once webkit.org/b/230321 is resolved.
-#if PLATFORM(IOS) && __IPHONE_OS_VERSION_MIN_REQUIRED < 150000
 TEST(WKWebViewPausePlayingAudioTests, OutOfWindow)
 {
     auto webView = adoptNS([[TestWKWebView alloc] initWithFrame:NSMakeRect(0, 0, 100, 100) configuration:autoplayingConfiguration().get() addToWindow:YES]);
@@ -104,7 +102,6 @@
 
     Util::run(&isPlaying);
 }
-#endif
 
 }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to