Diff
Modified: trunk/LayoutTests/ChangeLog (221866 => 221867)
--- trunk/LayoutTests/ChangeLog 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/ChangeLog 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,48 @@
+2017-09-11 Zan Dobersek <[email protected]>
+
+ [EME] ClearKey: implement CDMInstanceClearKey state modifiers, callback dispatches
+ https://bugs.webkit.org/show_bug.cgi?id=176687
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Update layout test baselines for ClearKey tests.
+
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession-expected.txt:
+ * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input-expected.txt:
+
2017-09-11 Carlos Alberto Lopez Perez <[email protected]>
[WPE] Bump freetype version to 2.8.0
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, basic events assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, basic events assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-events-session-closed-event-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey test MediaKeySession closed event. assert_unreached: Error: NotAllowedError Reached unreachable code
+FAIL org.w3.clearkey test MediaKeySession closed event. assert_unreached: Error: NotSupportedError Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-generate-request-disallowed-input-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,5 +1,5 @@
-FAIL org.w3.clearkey, temporary, keyids, initData longer than 64Kb characters assert_equals: expected "TypeError" but got "NotAllowedError"
-FAIL org.w3.clearkey, temporary, keyids, invalid initdata (too short key ID) assert_equals: expected "TypeError" but got "NotAllowedError"
-FAIL org.w3.clearkey, temporary, keyids, invalid initdata (too long key ID) assert_equals: expected "TypeError" but got "NotAllowedError"
+PASS org.w3.clearkey, temporary, keyids, initData longer than 64Kb characters
+FAIL org.w3.clearkey, temporary, keyids, invalid initdata (too short key ID) assert_equals: expected "TypeError" but got "NotSupportedError"
+FAIL org.w3.clearkey, temporary, keyids, invalid initdata (too long key ID) assert_equals: expected "TypeError" but got "NotSupportedError"
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-invalid-license-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,6 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.
-FAIL Update with invalid Clear Key license assert_unreached: Error: NotAllowedError Reached unreachable code
+Harness Error (TIMEOUT), message = null
+TIMEOUT Update with invalid Clear Key license Test timed out
+
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, keystatuses assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, keystatuses assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-keystatuses-multiple-sessions-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, keystatuses, multiple sessions assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, keystatuses, multiple sessions assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-clear-encrypted-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, single key, clear then encrypted content assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, single key, clear then encrypted content assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, single key, encrypted then clear content assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, single key, encrypted then clear content assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-encrypted-clear-sources-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, encrypted and clear sources assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, encrypted and clear sources assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-events-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, check events assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, check events assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, single key assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, single key assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, multikey audio/video assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, multikey audio/video assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, successful playback, temporary, mp4, multiple keys, sequential assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, successful playback, temporary, mp4, multiple keys, sequential assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multikey-sequential-readyState-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, successful playback, temporary, mp4, multiple keys, sequential, readyState assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, successful playback, temporary, mp4, multiple keys, sequential, readyState assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-multisession-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback with multiple sessions, multikey video assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback with multiple sessions, multikey video assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-src-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys after setting video.src assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys after setting video.src assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-after-update-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys after updating session assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys after updating session assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-immediately-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys first assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys first assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-setMediaKeys-onencrypted-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys in encrypted event assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback, setMediaKeys in encrypted event assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-two-videos-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, temporary, mp4, playback two videos assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, temporary, mp4, playback two videos assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-temporary-waitingforkey-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,5 @@
-FAIL org.w3.clearkey, successful playback, temporary, mp4, waitingforkey event, 1 key assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+Harness Error (TIMEOUT), message = null
+TIMEOUT org.w3.clearkey, successful playback, temporary, mp4, waitingforkey event, 1 key Test timed out
+
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-reset-src-after-setmediakeys-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,6 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: Error: Media source error
-FAIL Reset src after setMediaKeys(). assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+Harness Error (FAIL), message = Media source error
+PASS Reset src after setMediaKeys().
+
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-playback-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, setmediakeys again after playback assert_in_array: value "NotAllowedError" not in array ["InvalidStateError", "NotSupportedError"]
+FAIL org.w3.clearkey, setmediakeys again after playback assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-again-after-resetting-src-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, setmediakeys again after resetting src assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+FAIL org.w3.clearkey, setmediakeys again after resetting src assert_unreached: NotSupportedError: The operation is not supported. Reached unreachable code
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-at-same-time-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, setmediakeys at same time assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+PASS org.w3.clearkey, setmediakeys at same time
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, setMediaKeys assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+PASS org.w3.clearkey, setMediaKeys
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-different-mediakeys-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, setmediakeys multiple times with different mediakeys assert_equals: expected (undefined) undefined but got (object) null
+PASS org.w3.clearkey, setmediakeys multiple times with different mediakeys
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-multiple-times-with-the-same-mediakeys-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,3 @@
-FAIL org.w3.clearkey, setmediakeys multiple times with the same mediakeys assert_unreached: NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission. Reached unreachable code
+PASS org.w3.clearkey, setmediakeys multiple times with the same mediakeys
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-setmediakeys-to-multiple-video-elements-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,4 +1,4 @@
-FAIL org.w3.clearkey, setMediaKeys to multiple video elements assert_unreached: Error: assert_equals: expected "QuotaExceededError" but got "NotAllowedError" Reached unreachable code
+PASS org.w3.clearkey, setMediaKeys to multiple video elements
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeys-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,5 +1,7 @@
-FAIL org.w3.clearkey test MediaKeys attribute syntax promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test MediaKeys setServerCertificate() exceptions. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test MediaKeys setServerCertificate() syntax with non-empty certificate. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
+PASS org.w3.clearkey test MediaKeys attribute syntax
+FAIL org.w3.clearkey test MediaKeys setServerCertificate() exceptions. assert_unreached: function "function (mk) {
+ return mk.setServerCertificate(new Uint8Array(0));
+ }" Reached unreachable code
+PASS org.w3.clearkey test MediaKeys setServerCertificate() syntax with non-empty certificate.
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-syntax-mediakeysession-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,9 +1,9 @@
-FAIL org.w3.clearkey test MediaKeySession generateRequest() exceptions. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test MediaKeySession load() exceptions. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test if MediaKeySession generateRequest() resolves for various sessions promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test MediaKeySession update() exceptions. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test MediaKeySession close() exceptions. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test MediaKeySession remove() exceptions. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey test MediaKeySession attribute syntax. promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
+PASS org.w3.clearkey test MediaKeySession generateRequest() exceptions.
+PASS org.w3.clearkey test MediaKeySession load() exceptions.
+FAIL org.w3.clearkey test if MediaKeySession generateRequest() resolves for various sessions promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+FAIL org.w3.clearkey test MediaKeySession update() exceptions. promise_test: Unhandled rejection with value: object "NotSupportedError: The operation is not supported."
+PASS org.w3.clearkey test MediaKeySession close() exceptions.
+PASS org.w3.clearkey test MediaKeySession remove() exceptions.
+PASS org.w3.clearkey test MediaKeySession attribute syntax.
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-update-disallowed-input-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,6 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.
-FAIL update() with invalid response (longer than 64Kb characters) should fail. assert_equals: expected "TypeError" but got "NotAllowedError"
+Harness Error (TIMEOUT), message = null
+TIMEOUT update() with invalid response (longer than 64Kb characters) should fail. Test timed out
+
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-waiting-for-a-key-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,5 @@
-FAIL Waiting for a key. assert_unreached: Error: NotAllowedError Reached unreachable code
+Harness Error (TIMEOUT), message = null
+TIMEOUT Waiting for a key. Test timed out
+
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-not-callable-after-createsession-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,5 +1,5 @@
-FAIL org.w3.clearkey, temporary, update() immediately after createSession() promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey, temporary, close() immediately after createSession() promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
-FAIL org.w3.clearkey, temporary, remove() immediately after createSession() promise_test: Unhandled rejection with value: object "NotAllowedError: The request is not allowed by the user agent or the platform in the current context, possibly because the user denied permission."
+PASS org.w3.clearkey, temporary, update() immediately after createSession()
+PASS org.w3.clearkey, temporary, close() immediately after createSession()
+PASS org.w3.clearkey, temporary, remove() immediately after createSession()
Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input-expected.txt (221866 => 221867)
--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input-expected.txt 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-update-non-ascii-input-expected.txt 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,6 @@
+CONSOLE MESSAGE: Unhandled Promise Rejection: NotSupportedError: The operation is not supported.
-FAIL org.w3.clearkey test handling of non-ASCII responses for update() assert_unreached: Error: NotAllowedError Reached unreachable code
+Harness Error (TIMEOUT), message = null
+TIMEOUT org.w3.clearkey test handling of non-ASCII responses for update() Test timed out
+
Modified: trunk/Source/WebCore/ChangeLog (221866 => 221867)
--- trunk/Source/WebCore/ChangeLog 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/Source/WebCore/ChangeLog 2017-09-11 18:27:54 UTC (rev 221867)
@@ -1,3 +1,37 @@
+2017-09-11 Zan Dobersek <[email protected]>
+
+ [EME] ClearKey: implement CDMInstanceClearKey state modifiers, callback dispatches
+ https://bugs.webkit.org/show_bug.cgi?id=176687
+
+ Reviewed by Xabier Rodriguez-Calvar.
+
+ Implement the state modification methods on the CDMInstanceClearKey class.
+ Initialization method is a no-op, but returns Succeeded. Distinctive
+ identifier and persistent state setters return Succeeded if the passed-in
+ value is false. setServerCertificate() still returns Failed due to server
+ certificates not being supported in this ClearKey implementation.
+
+ The license and session operation methods are also implemented, but for
+ now the implementations simply schedule a main thread dispatch that
+ invokes the callback with failure-indicating values. This avoids various
+ tests timing out, instead preferring that the tests for now fail with an
+ exception (in most cases NotSupportedError).
+
+ No new tests -- relevant tests have baselines updated.
+
+ * platform/encryptedmedia/clearkey/CDMClearKey.cpp:
+ (WebCore::CDMInstanceClearKey::CDMInstanceClearKey):
+ (WebCore::CDMInstanceClearKey::initializeWithConfiguration):
+ (WebCore::CDMInstanceClearKey::setDistinctiveIdentifiersAllowed):
+ (WebCore::CDMInstanceClearKey::setPersistentStateAllowed):
+ (WebCore::CDMInstanceClearKey::setServerCertificate):
+ (WebCore::CDMInstanceClearKey::requestLicense):
+ (WebCore::CDMInstanceClearKey::updateLicense):
+ (WebCore::CDMInstanceClearKey::loadSession):
+ (WebCore::CDMInstanceClearKey::closeSession):
+ (WebCore::CDMInstanceClearKey::removeSessionData):
+ * platform/encryptedmedia/clearkey/CDMClearKey.h:
+
2017-09-11 Alex Christensen <[email protected]>
Modernize BoxExtent into RectEdges
Modified: trunk/Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp (221866 => 221867)
--- trunk/Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp 2017-09-11 18:27:54 UTC (rev 221867)
@@ -36,6 +36,7 @@
#include "CDMSessionType.h"
#include "SharedBuffer.h"
#include <inspector/InspectorValues.h>
+#include <wtf/MainThread.h>
using namespace Inspector;
@@ -206,47 +207,90 @@
return sessionId;
}
-CDMInstanceClearKey::CDMInstanceClearKey() = default;
+CDMInstanceClearKey::CDMInstanceClearKey()
+ : m_weakPtrFactory(this)
+{
+}
+
CDMInstanceClearKey::~CDMInstanceClearKey() = default;
CDMInstance::SuccessValue CDMInstanceClearKey::initializeWithConfiguration(const CDMKeySystemConfiguration&)
{
- return Failed;
+ // No-op.
+ return Succeeded;
}
-CDMInstance::SuccessValue CDMInstanceClearKey::setDistinctiveIdentifiersAllowed(bool)
+CDMInstance::SuccessValue CDMInstanceClearKey::setDistinctiveIdentifiersAllowed(bool allowed)
{
- return Failed;
+ // Reject setting distinctive identifiers as allowed.
+ return !allowed ? Succeeded : Failed;
}
-CDMInstance::SuccessValue CDMInstanceClearKey::setPersistentStateAllowed(bool)
+CDMInstance::SuccessValue CDMInstanceClearKey::setPersistentStateAllowed(bool allowed)
{
- return Failed;
+ // Reject setting persistent state as allowed.
+ return !allowed ? Succeeded : Failed;
}
CDMInstance::SuccessValue CDMInstanceClearKey::setServerCertificate(Ref<SharedBuffer>&&)
{
+ // Reject setting any server certificate.
return Failed;
}
-void CDMInstanceClearKey::requestLicense(LicenseType, const AtomicString&, Ref<SharedBuffer>&&, LicenseCallback)
+void CDMInstanceClearKey::requestLicense(LicenseType, const AtomicString&, Ref<SharedBuffer>&&, LicenseCallback callback)
{
+ callOnMainThread(
+ [weakThis = m_weakPtrFactory.createWeakPtr(), callback = WTFMove(callback)] {
+ if (!weakThis)
+ return;
+
+ callback(SharedBuffer::create(), String { }, false, Failed);
+ });
}
-void CDMInstanceClearKey::updateLicense(const String&, LicenseType, const SharedBuffer&, LicenseUpdateCallback)
+void CDMInstanceClearKey::updateLicense(const String&, LicenseType, const SharedBuffer&, LicenseUpdateCallback callback)
{
+ callOnMainThread(
+ [weakThis = m_weakPtrFactory.createWeakPtr(), callback = WTFMove(callback)] {
+ if (!weakThis)
+ return;
+
+ callback(false, std::nullopt, std::nullopt, std::nullopt, Failed);
+ });
}
-void CDMInstanceClearKey::loadSession(LicenseType, const String&, const String&, LoadSessionCallback)
+void CDMInstanceClearKey::loadSession(LicenseType, const String&, const String&, LoadSessionCallback callback)
{
+ callOnMainThread(
+ [weakThis = m_weakPtrFactory.createWeakPtr(), callback = WTFMove(callback)] {
+ if (!weakThis)
+ return;
+
+ callback(std::nullopt, std::nullopt, std::nullopt, Failed, SessionLoadFailure::Other);
+ });
}
-void CDMInstanceClearKey::closeSession(const String&, CloseSessionCallback)
+void CDMInstanceClearKey::closeSession(const String&, CloseSessionCallback callback)
{
+ callOnMainThread(
+ [weakThis = m_weakPtrFactory.createWeakPtr(), callback = WTFMove(callback)] {
+ if (!weakThis)
+ return;
+
+ callback();
+ });
}
-void CDMInstanceClearKey::removeSessionData(const String&, LicenseType, RemoveSessionDataCallback)
+void CDMInstanceClearKey::removeSessionData(const String&, LicenseType, RemoveSessionDataCallback callback)
{
+ callOnMainThread(
+ [weakThis = m_weakPtrFactory.createWeakPtr(), callback = WTFMove(callback)] {
+ if (!weakThis)
+ return;
+
+ callback({ }, std::nullopt, Failed);
+ });
}
void CDMInstanceClearKey::storeRecordOfKeyUsage(const String&)
Modified: trunk/Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.h (221866 => 221867)
--- trunk/Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.h 2017-09-11 17:57:55 UTC (rev 221866)
+++ trunk/Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.h 2017-09-11 18:27:54 UTC (rev 221867)
@@ -34,6 +34,7 @@
#include "CDMInstance.h"
#include "CDMPrivate.h"
#include "SharedBuffer.h"
+#include <wtf/WeakPtr.h>
namespace WebCore {
@@ -102,6 +103,7 @@
const Vector<Key>& keys() const { return m_keys; }
private:
+ WeakPtrFactory<CDMInstanceClearKey> m_weakPtrFactory;
Vector<Key> m_keys;
};