Modified: trunk/Tools/ChangeLog (272562 => 272563)
--- trunk/Tools/ChangeLog 2021-02-09 01:45:06 UTC (rev 272562)
+++ trunk/Tools/ChangeLog 2021-02-09 01:47:02 UTC (rev 272563)
@@ -1,3 +1,14 @@
+2021-02-08 Eric Carlson <[email protected]>
+
+ [Mac] Connect MediaSession with MediaRemote and NowPlaying
+ https://bugs.webkit.org/show_bug.cgi?id=221431
+ <rdar://problem/74000363>
+
+ Unreviewed build fix for macOS Catalina.
+
+ * TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm:
+ (TestWebKitAPI::TEST_F): Add compile guards for Catalina.
+
2021-02-08 Commit Queue <[email protected]>
Unreviewed, reverting r272480, r272481, and r272500.
Modified: trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm (272562 => 272563)
--- trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm 2021-02-09 01:45:06 UTC (rev 272562)
+++ trunk/Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm 2021-02-09 01:47:02 UTC (rev 272563)
@@ -271,6 +271,7 @@
listenForSessionHandlerMessages({ "play", "pause", "seekto", "seekforward", "seekbackward", "previoustrack", "nexttrack" });
listenForEventMessages({ "play", "pause", "seeked" });
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
static Vector<MRMediaRemoteCommand> registeredCommands = { MRMediaRemoteCommandPlay };
auto currentCommands = getSupportedCommands();
for (MRCommandInfo *command in currentCommands.get()) {
@@ -279,6 +280,7 @@
ASSERT_TRUE(registeredCommands.contains(command.command));
}
+#endif
ASSERT_TRUE(sendMediaRemoteCommand(MRMediaRemoteCommandPlay));
waitForSessionHandlerToBeCalled("play");
@@ -314,6 +316,7 @@
listenForSessionHandlerMessages({ "play", "pause", "seekto", "seekforward", "seekbackward", "previoustrack", "nexttrack" });
listenForEventMessages({ "play", "pause", "seeked" });
+#if __MAC_OS_X_VERSION_MIN_REQUIRED >= 101500
static Vector<MRMediaRemoteCommand> registeredCommands = { MRMediaRemoteCommandPlay, MRMediaRemoteCommandPause, MRMediaRemoteCommandSeekToPlaybackPosition, MRMediaRemoteCommandSkipForward, MRMediaRemoteCommandSkipBackward, MRMediaRemoteCommandPreviousTrack, MRMediaRemoteCommandNextTrack };
auto currentCommands = getSupportedCommands();
for (MRCommandInfo *command in currentCommands.get()) {
@@ -322,6 +325,7 @@
ASSERT_TRUE(registeredCommands.contains(command.command));
}
+#endif
ASSERT_TRUE(sendMediaRemoteCommand(MRMediaRemoteCommandPlay));
waitForSessionHandlerToBeCalled("play");