WebKit Bugzilla
Attachment 350012 Details for
Bug 189619
: [EME] Queue a "message" Event algorithm should enqueue a task
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189619-20180918131235.patch (text/plain), 9.45 KB, created by
Xabier RodrÃguez Calvar
on 2018-09-18 04:12:36 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Xabier RodrÃguez Calvar
Created:
2018-09-18 04:12:36 PDT
Size:
9.45 KB
patch
obsolete
>Subversion Revision: 236104 >diff --git a/Source/WebCore/ChangeLog b/Source/WebCore/ChangeLog >index 578df152123214b1a2fb1a5ff370f687be7f95a6..3bd7e289984028ab70edcee2964273484155377a 100644 >--- a/Source/WebCore/ChangeLog >+++ b/Source/WebCore/ChangeLog >@@ -1,3 +1,16 @@ >+2018-09-18 Xabier Rodriguez Calvar <calvaris@igalia.com> >+ >+ [EME] Queue a "message" Event algorithm should enqueue a task >+ https://bugs.webkit.org/show_bug.cgi?id=189619 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Test: imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https.html >+ >+ * Modules/encryptedmedia/MediaKeySession.cpp: >+ (WebCore::MediaKeySession::enqueueMessage): Send the message >+ inside a queued task. >+ > 2018-09-18 Xabier Rodriguez Calvar <calvaris@igalia.com> > > [EME][GStreamer] The current EME implementation doesn't support the waitingforkey event >diff --git a/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp b/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp >index eb72ce0778e81cbbcfbeba434c7828dd9a1152a4..7c16e3b829066fba72c9a400d3960bb74ffae103 100644 >--- a/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp >+++ b/Source/WebCore/Modules/encryptedmedia/MediaKeySession.cpp >@@ -596,7 +596,9 @@ void MediaKeySession::enqueueMessage(MediaKeyMessageType messageType, const Shar > // interface with its type attribute set to message and its isTrusted attribute initialized to true, and dispatch it at the > // session. > auto messageEvent = MediaKeyMessageEvent::create(eventNames().messageEvent, {messageType, message.tryCreateArrayBuffer()}, Event::IsTrusted::Yes); >- m_eventQueue.enqueueEvent(WTFMove(messageEvent)); >+ m_taskQueue.enqueueTask([this, messageEvent = WTFMove(messageEvent)] () mutable { >+ m_eventQueue.enqueueEvent(WTFMove(messageEvent)); >+ }); > } > > void MediaKeySession::updateKeyStatuses(CDMInstanceClient::KeyStatusVector&& inputStatuses) >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index 5da3bce7aec24c143964ca305c61b08eab95c049..127a0f187b52ea01c2d9273966cc8c6eadddb58f 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,22 @@ >+2018-09-18 Xabier Rodriguez Calvar <calvaris@igalia.com> >+ >+ [EME] Queue a "message" Event algorithm should enqueue a task >+ https://bugs.webkit.org/show_bug.cgi?id=189619 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * media/encrypted-media/mock-MediaKeySession-remove-expected.txt: >+ * media/encrypted-media/mock-MediaKeySession-remove.html: As per >+ spec, promise callbacks are run before events so events arrive >+ later than promise callbacks. >+ * platform/wpe/TestExpectations: Removed >+ clearkey-mp4-waiting-for-a-key.https.html from failures. >+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events.https-expected.txt: >+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https-expected.txt: >+ Updated expectations because they keep failing, but later. >+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https-expected.txt: >+ Pass expectations updated. >+ > 2018-09-18 Xabier Rodriguez Calvar <calvaris@igalia.com> > > [EME][GStreamer] The current EME implementation doesn't support the waitingforkey event >diff --git a/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove-expected.txt b/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove-expected.txt >index 22c2f0bd2603d69247047578cd1d5c8eb1eda5e9..cc6f400eee9590dd0eb57d048229261702524078 100644 >--- a/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove-expected.txt >+++ b/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove-expected.txt >@@ -37,6 +37,7 @@ RUN(mediaKeySession = mediaKeys.createSession("temporary")) > RUN(promise = mediaKeySession.generateRequest("keyids", encoder.encode(kids))) > Promise resolved OK > RUN(promise = mediaKeySession.remove()) >+EXPECTED (event.messageType == 'license-request') OK > EXPECTED (event.messageType == 'license-release') OK > EXPECTED (new Uint8Array(event.message).length == '14') OK > EXPECTED (new Uint8Array(event.message)[0] == '114') OK >diff --git a/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove.html b/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove.html >index da865892bf7fd7a6aa1c8ce8d95fb18fdb9ea99d..84e6c2f295f248d231aa7c7487c0260c2f4335b0 100644 >--- a/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove.html >+++ b/LayoutTests/media/encrypted-media/mock-MediaKeySession-remove.html >@@ -93,11 +93,17 @@ > run('promise = mediaKeySession.generateRequest("keyids", encoder.encode(kids))'); > shouldResolve(promise).then(function() { > run('promise = mediaKeySession.remove()'); >+ let receivedRequest = false; > mediaKeySession.addEventListener('message', function(event) { >- testExpected('event.messageType', 'license-release'); >- testArraysEqual('new Uint8Array(event.message)', encoder.encode("remove-message")); >+ if (!receivedRequest) { >+ testExpected('event.messageType', 'license-request'); >+ receivedRequest = true; >+ } else { >+ testExpected('event.messageType', 'license-release'); >+ testArraysEqual('new Uint8Array(event.message)', encoder.encode("remove-message")); > >- shouldResolve(promise).then(next, next); >+ shouldResolve(promise).then(next, next); >+ } > }, true); > }, next); > }, >diff --git a/LayoutTests/platform/wpe/TestExpectations b/LayoutTests/platform/wpe/TestExpectations >index e9659ed0a7ee5b2ca82c2ca4701b4bb6a4c6bccc..cf817070dfef162fd7665ef7ead347f2b294d51c 100644 >--- a/LayoutTests/platform/wpe/TestExpectations >+++ b/LayoutTests/platform/wpe/TestExpectations >@@ -1213,7 +1213,6 @@ media/encrypted-media/encrypted-media-v2-syntax.html [ Skip ] > #"waitingforkey" event is not supported yet > webkit.org/b/189618 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState.https.html [ Failure ] > webkit.org/b/189618 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential.https.html [ Failure ] >-webkit.org/b/189619 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https.html [ Failure ] > > webkit.org/b/185594 imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted.https.html [ Failure ] > >diff --git a/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events.https-expected.txt b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events.https-expected.txt >index d1fb1b2e7212dd1dbb33ffb6f94de5de3af0eaa3..b5da437751ee9418383b0539c20afeb8657665ab 100644 >--- a/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events.https-expected.txt >+++ b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-persistent-license-events.https-expected.txt >@@ -1,3 +1,3 @@ > >-FAIL org.w3.clearkey, persistent-license, mp4, playback, check events assert_equals: Expected 1st event to be 'generaterequest' expected "generaterequest" but got "license-request" >+FAIL org.w3.clearkey, persistent-license, mp4, playback, check events assert_equals: Expected 4th event to be 'license-request-response-resolved' expected "license-request-response-resolved" but got "keystatuseschange-usablekey" > >diff --git a/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https-expected.txt b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https-expected.txt >index a9ac78c90bed73c8292eab1a0e4db478a03f16f0..f2b909f4636bc24757ddf52aa3d5e66c3bccaaa7 100644 >--- a/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https-expected.txt >+++ b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events.https-expected.txt >@@ -1,3 +1,3 @@ > >-FAIL org.w3.clearkey, temporary, mp4, playback, check events assert_equals: Expected 1st event to be 'generaterequest' expected "generaterequest" but got "license-request" >+FAIL org.w3.clearkey, temporary, mp4, playback, check events assert_equals: Expected 4th event to be 'update-resolved' expected "update-resolved" but got "allkeysusable" > >diff --git a/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https-expected.txt b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https-expected.txt >index 7377617aee377c0efc389cc75b7ef66099ca2c4b..99117214695e3f711260aa5001b017821c69789b 100644 >--- a/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https-expected.txt >+++ b/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key.https-expected.txt >@@ -1,3 +1,3 @@ > >-Pass Waiting for a key. >+PASS Waiting for a key. >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189619
:
349759
|
350012
|
350209
|
350347