Title: [274732] trunk
Revision
274732
Author
[email protected]
Date
2021-03-19 12:22:26 -0700 (Fri, 19 Mar 2021)

Log Message

[GPUP] platform/mac/media/encrypted-media/fps-clearkey-crash.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=221687
<rdar://problem/74438911>

Reviewed by Eric Carlson.

Source/WebKit:

Add support for passing the value of MediaPlayerPrivate::waitingForKey() across the process boundary.

* GPUProcess/media/RemoteMediaPlayerProxy.cpp:
(WebKit::RemoteMediaPlayerProxy::mediaPlayerWaitingForKeyChanged):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
(WebKit::MediaPlayerPrivateRemote::waitingForKeyChanged):
(WebKit::MediaPlayerPrivateRemote::waitingForKey const):
* WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
* WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:

LayoutTests:

* platform/mac-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (274731 => 274732)


--- trunk/LayoutTests/ChangeLog	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/LayoutTests/ChangeLog	2021-03-19 19:22:26 UTC (rev 274732)
@@ -1,3 +1,13 @@
+2021-03-19  Jer Noble  <[email protected]>
+
+        [GPUP] platform/mac/media/encrypted-media/fps-clearkey-crash.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=221687
+        <rdar://problem/74438911>
+
+        Reviewed by Eric Carlson.
+
+        * platform/mac-wk2/TestExpectations:
+
 2021-03-19  Peng Liu  <[email protected]>
 
         [GPUP] Test imported/w3c/web-platform-tests/fetch/range/general.window.html fails when media in GPU process is enabled.

Modified: trunk/LayoutTests/platform/mac/media/encrypted-media/fps-clearkey-crash-expected.txt (274731 => 274732)


--- trunk/LayoutTests/platform/mac/media/encrypted-media/fps-clearkey-crash-expected.txt	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/LayoutTests/platform/mac/media/encrypted-media/fps-clearkey-crash-expected.txt	2021-03-19 19:22:26 UTC (rev 274732)
@@ -1,8 +1,14 @@
 
 Tests that creating an incompatible MediaKeys object with MediaSource does not crash.
+Loading media data:
+Promise resolved OK
 EVENT(sourceopen)
 EVENT(update)
-requestMediaKeySystemAccess promise resolved
-createMediaKeys promise resolved
+Requesting MediaKeySystemAccess:
+Promise resolved OK
+Creating MediaKeys:
+Promise resolved OK
+Setting keys on media element:
+Promise resolved OK
 END OF TEST
 

Modified: trunk/LayoutTests/platform/mac/media/encrypted-media/fps-clearkey-crash.html (274731 => 274732)


--- trunk/LayoutTests/platform/mac/media/encrypted-media/fps-clearkey-crash.html	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/LayoutTests/platform/mac/media/encrypted-media/fps-clearkey-crash.html	2021-03-19 19:22:26 UTC (rev 274732)
@@ -9,6 +9,8 @@
     let sourceBuffer;
 
     window.addEventListener('load', async event => {
+        failTestIn(5000);
+
         consoleWrite('Tests that creating an incompatible MediaKeys object with MediaSource does not crash.')
         findMediaElement();
         loader = new MediaSourceLoader('../../../../media/media-source/content/test-fragmented-manifest.json', '../../../../media/media-source/');
@@ -16,26 +18,28 @@
             loader._onload_ = resolve;
             loader._onerror_ = reject;
         })
-        await loaderPromise;
+        consoleWrite('Loading media data:');
+        await shouldResolve(loaderPromise);
 
         source = new MediaSource();
         video.src = ""
         await waitFor(source, 'sourceopen'),
 
-        sourceBuffer = source.addSourceBuffer('video/mp4');
+        sourceBuffer = source.addSourceBuffer(loader.type());
         sourceBuffer.appendBuffer(loader.initSegment());
         await waitFor(sourceBuffer, 'update');
 
-
-        let access = await navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{
+        consoleWrite('Requesting MediaKeySystemAccess:')
+        let access = await shouldResolve(navigator.requestMediaKeySystemAccess('org.w3.clearkey', [{
             initDataTypes: ["cenc"],
             videoCapabilities: [{contentType : 'video/mp4; codecs="avc1.64001F"'}]
-        }]);
-        consoleWrite('requestMediaKeySystemAccess promise resolved');
+        }]));
 
-        let keys = await access.createMediaKeys();
-        video.setMediaKeys(keys);
-        consoleWrite('createMediaKeys promise resolved');
+        consoleWrite('Creating MediaKeys:')
+        let keys = await shouldResolve(access.createMediaKeys());
+
+        consoleWrite('Setting keys on media element:')
+        await shouldResolve(video.setMediaKeys(keys));
         endTest();
     });
     </script>

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (274731 => 274732)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2021-03-19 19:22:26 UTC (rev 274732)
@@ -1313,9 +1313,6 @@
 webanimations/transform-property-and-transform-animation-with-delay-on-forced-layer.html [ Pass ]
 webanimations/translate-property-and-translate-animation-with-delay-on-forced-layer.html [ Pass ]
 
-# webkit.org/b/221687
-platform/mac/media/encrypted-media/fps-clearkey-crash.html [ Timeout Crash ]
-
 webkit.org/b/221847 platform/mac/media/encrypted-media/fps-encrypted-event.html [ Pass Timeout ]
 
 webkit.org/b/221857 fast/selectors/text-field-selection-window-inactive-text-shadow.html [ Pass ImageOnlyFailure ]

Modified: trunk/Source/WebKit/ChangeLog (274731 => 274732)


--- trunk/Source/WebKit/ChangeLog	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/Source/WebKit/ChangeLog	2021-03-19 19:22:26 UTC (rev 274732)
@@ -1,3 +1,21 @@
+2021-03-19  Jer Noble  <[email protected]>
+
+        [GPUP] platform/mac/media/encrypted-media/fps-clearkey-crash.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=221687
+        <rdar://problem/74438911>
+
+        Reviewed by Eric Carlson.
+
+        Add support for passing the value of MediaPlayerPrivate::waitingForKey() across the process boundary.
+
+        * GPUProcess/media/RemoteMediaPlayerProxy.cpp:
+        (WebKit::RemoteMediaPlayerProxy::mediaPlayerWaitingForKeyChanged):
+        * WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp:
+        (WebKit::MediaPlayerPrivateRemote::waitingForKeyChanged):
+        (WebKit::MediaPlayerPrivateRemote::waitingForKey const):
+        * WebProcess/GPU/media/MediaPlayerPrivateRemote.h:
+        * WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in:
+
 2021-03-19  Peng Liu  <[email protected]>
 
         [GPUP] Test imported/w3c/web-platform-tests/fetch/range/general.window.html fails when media in GPU process is enabled.

Modified: trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp (274731 => 274732)


--- trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/Source/WebKit/GPUProcess/media/RemoteMediaPlayerProxy.cpp	2021-03-19 19:22:26 UTC (rev 274732)
@@ -672,7 +672,7 @@
 
 void RemoteMediaPlayerProxy::mediaPlayerWaitingForKeyChanged()
 {
-    m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::WaitingForKeyChanged(), m_id);
+    m_webProcessConnection->send(Messages::MediaPlayerPrivateRemote::WaitingForKeyChanged(m_player->waitingForKey()), m_id);
 }
 #endif
 

Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp (274731 => 274732)


--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.cpp	2021-03-19 19:22:26 UTC (rev 274732)
@@ -1085,8 +1085,9 @@
         connection().send(Messages::RemoteMediaPlayerProxy::AttemptToDecryptWithInstance(downcast<RemoteCDMInstance>(instance).identifier()), m_id);
 }
 
-void MediaPlayerPrivateRemote::waitingForKeyChanged()
+void MediaPlayerPrivateRemote::waitingForKeyChanged(bool waitingForKey)
 {
+    m_waitingForKey = waitingForKey;
     m_player->waitingForKeyChanged();
 }
 
@@ -1098,8 +1099,7 @@
 
 bool MediaPlayerPrivateRemote::waitingForKey() const
 {
-    notImplemented();
-    return false;
+    return m_waitingForKey;
 }
 #endif
 

Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h (274731 => 274732)


--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.h	2021-03-19 19:22:26 UTC (rev 274732)
@@ -145,7 +145,7 @@
     void activeSourceBuffersChanged();
 
 #if ENABLE(ENCRYPTED_MEDIA)
-    void waitingForKeyChanged();
+    void waitingForKeyChanged(bool);
     void initializationDataEncountered(const String&, IPC::DataReference&&);
 #endif
 
@@ -422,6 +422,7 @@
     bool m_isCurrentPlaybackTargetWireless { false };
     bool m_invalid { false };
     bool m_wantPlaybackQualityMetrics { false };
+    bool m_waitingForKey { false };
 };
 
 } // namespace WebKit

Modified: trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in (274731 => 274732)


--- trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in	2021-03-19 19:21:17 UTC (rev 274731)
+++ trunk/Source/WebKit/WebProcess/GPU/media/MediaPlayerPrivateRemote.messages.in	2021-03-19 19:22:26 UTC (rev 274732)
@@ -74,7 +74,7 @@
     ActiveSourceBuffersChanged()
 
 #if ENABLE(ENCRYPTED_MEDIA)
-    WaitingForKeyChanged()
+    WaitingForKeyChanged(bool waitingForKey)
     InitializationDataEncountered(String initDataType, IPC::DataReference initData)
 #endif
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to