Title: [222432] trunk
Revision
222432
Author
[email protected]
Date
2017-09-24 03:32:49 -0700 (Sun, 24 Sep 2017)

Log Message

[WebKit] Changing EME setting through InjectedBundle should update WebPreferencesStore
https://bugs.webkit.org/show_bug.cgi?id=177312

Reviewed by Carlos Garcia Campos.

Source/WebKit:

When enabling EME through the InjectedBundle for testing purposes, it's
only enabled in RuntimeEnabledFeatures, but not in WebPreferencesStore.
This causes failures on imported W3C tests that cover EME persistent
state licenses and perform parts of that test in a new window, where
the original RuntimeEnabledFeatures state doesn't have any effect.

To avoid those failures, when enabling EME feature for testing purposes
through InjectedBundle, the feature should also be enabled in the
WebPreferencesStore.

* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):

LayoutTests:

Update test baselines for two tests that now properly execute (even if
they still fail) due to EME setting now also being updated in
WebPreferencesStore.

* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt:
* platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (222431 => 222432)


--- trunk/LayoutTests/ChangeLog	2017-09-24 06:22:58 UTC (rev 222431)
+++ trunk/LayoutTests/ChangeLog	2017-09-24 10:32:49 UTC (rev 222432)
@@ -1,3 +1,17 @@
+2017-09-24  Zan Dobersek  <[email protected]>
+
+        [WebKit] Changing EME setting through InjectedBundle should update WebPreferencesStore
+        https://bugs.webkit.org/show_bug.cgi?id=177312
+
+        Reviewed by Carlos Garcia Campos.
+
+        Update test baselines for two tests that now properly execute (even if
+        they still fail) due to EME setting now also being updated in
+        WebPreferencesStore.
+
+        * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt:
+        * platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt:
+
 2017-09-22  Antti Koivisto  <[email protected]>
 
         Remove tests for CSS Regions

Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt (222431 => 222432)


--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt	2017-09-24 06:22:58 UTC (rev 222431)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-destroy-persistent-license-expected.txt	2017-09-24 10:32:49 UTC (rev 222432)
@@ -1,6 +1,3 @@
-CONSOLE MESSAGE: line 81: TypeError: navigator.requestMediaKeySystemAccess is not a function. (In 'navigator.requestMediaKeySystemAccess(config.keysystem, [ configuration ] )', 'navigator.requestMediaKeySystemAccess' is undefined)
 
-Harness Error (TIMEOUT), message = null
+FAIL org.w3.clearkey, persistent-license, mp4, playback, retrieve, playback and destroy assert_equals: NotSupportedError: The operation is not supported. expected true but got false
 
-TIMEOUT org.w3.clearkey, persistent-license, mp4, playback, retrieve, playback and destroy Test timed out
-

Modified: trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt (222431 => 222432)


--- trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt	2017-09-24 06:22:58 UTC (rev 222431)
+++ trunk/LayoutTests/platform/wpe/imported/w3c/web-platform-tests/encrypted-media/clearkey-mp4-playback-retrieve-persistent-license-expected.txt	2017-09-24 10:32:49 UTC (rev 222432)
@@ -1,6 +1,3 @@
-CONSOLE MESSAGE: line 53: TypeError: navigator.requestMediaKeySystemAccess is not a function. (In 'navigator.requestMediaKeySystemAccess(config.keysystem, [ configuration ] )', 'navigator.requestMediaKeySystemAccess' is undefined)
 
-Harness Error (TIMEOUT), message = null
+FAIL org.w3.clearkey, persistent-license, mp4, playback, retrieve and playback assert_equals: NotSupportedError: The operation is not supported. expected true but got false
 
-TIMEOUT org.w3.clearkey, persistent-license, mp4, playback, retrieve and playback Test timed out
-

Modified: trunk/Source/WebKit/ChangeLog (222431 => 222432)


--- trunk/Source/WebKit/ChangeLog	2017-09-24 06:22:58 UTC (rev 222431)
+++ trunk/Source/WebKit/ChangeLog	2017-09-24 10:32:49 UTC (rev 222432)
@@ -1,3 +1,23 @@
+2017-09-24  Zan Dobersek  <[email protected]>
+
+        [WebKit] Changing EME setting through InjectedBundle should update WebPreferencesStore
+        https://bugs.webkit.org/show_bug.cgi?id=177312
+
+        Reviewed by Carlos Garcia Campos.
+
+        When enabling EME through the InjectedBundle for testing purposes, it's
+        only enabled in RuntimeEnabledFeatures, but not in WebPreferencesStore.
+        This causes failures on imported W3C tests that cover EME persistent
+        state licenses and perform parts of that test in a new window, where
+        the original RuntimeEnabledFeatures state doesn't have any effect.
+
+        To avoid those failures, when enabling EME feature for testing purposes
+        through InjectedBundle, the feature should also be enabled in the
+        WebPreferencesStore.
+
+        * WebProcess/InjectedBundle/InjectedBundle.cpp:
+        (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+
 2017-09-22  Zalan Bujtas  <[email protected]>
 
         WeakPtrFactory should populate m_ref lazily.

Modified: trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp (222431 => 222432)


--- trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2017-09-24 06:22:58 UTC (rev 222431)
+++ trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp	2017-09-24 10:32:49 UTC (rev 222432)
@@ -215,8 +215,10 @@
         RuntimeEnabledFeatures::sharedFeatures().setModernMediaControlsEnabled(enabled);
 
 #if ENABLE(ENCRYPTED_MEDIA)
-    if (preference == "WebKitEncryptedMediaAPIEnabled")
+    if (preference == "WebKitEncryptedMediaAPIEnabled") {
+        WebPreferencesStore::overrideBoolValueForKey(WebPreferencesKey::encryptedMediaAPIEnabledKey(), enabled);
         RuntimeEnabledFeatures::sharedFeatures().setEncryptedMediaAPIEnabled(enabled);
+    }
 #endif
 
 #if ENABLE(MEDIA_STREAM)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to