Skip to content

Commit e2f800d

Browse files
Enable Modern EME tests in DumpRenderTree
https://bugs.webkit.org/show_bug.cgi?id=179544 Reviewed by Alex Christensen. Source/WebKitLegacy/mac: Add a WebPreferences property to enable the (modern) EME API. * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences encryptedMediaAPIEnabled]): (-[WebPreferences setEncryptedMediaAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): LayoutTests: * platform/mac-wk1/TestExpectations: * platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt: git-svn-id: http://svn.webkit.org/repository/webkit/trunk@224833 268f45cc-cd09-0410-ab3c-d52691b4dbfc
1 parent 66903c8 commit e2f800d

File tree

10 files changed

+58
-3
lines changed

10 files changed

+58
-3
lines changed

LayoutTests/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2017-11-14 Jer Noble <[email protected]>
2+
3+
Enable Modern EME tests in DumpRenderTree
4+
https://bugs.webkit.org/show_bug.cgi?id=179544
5+
6+
Reviewed by Alex Christensen.
7+
8+
* platform/mac-wk1/TestExpectations:
9+
* platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt:
10+
111
2017-11-14 Youenn Fablet <[email protected]>
212

313
WebSWClientConnection should do IPC to StorageProcess if its WebSWOriginTable is not yet initialized

LayoutTests/platform/mac-wk1/TestExpectations

-3
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,3 @@ webkit.org/b/177020 fast/events/beforeunload-dom-manipulation-crash.html [ Skip
465465
webkit.org/b/177563 [ HighSierra ] http/tests/xmlhttprequest/response-empty-arraybuffer.html [ Failure ]
466466

467467
webkit.org/b/172397 [ Debug ] animations/needs-layout.html [ Pass ImageOnlyFailure ]
468-
469-
webkit.org/b/179544 platform/mac/media/encrypted-media/fps-createMediaKeys.html [ Failure ]
470-
webkit.org/b/179544 platform/mac/media/encrypted-media/fps-requestMediaKeySystemAccess.html [ Skip ]

LayoutTests/platform/mac-wk1/fast/dom/navigator-detached-no-crash-expected.txt

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ navigator.platform is OK
1414
navigator.plugins is OK
1515
navigator.product is OK
1616
navigator.productSub is OK
17+
navigator.requestMediaKeySystemAccess() is OK
1718
navigator.userAgent is OK
1819
navigator.vendor is OK
1920
navigator.vendorSub is OK
@@ -32,6 +33,7 @@ navigator.platform is OK
3233
navigator.plugins is OK
3334
navigator.product is OK
3435
navigator.productSub is OK
36+
navigator.requestMediaKeySystemAccess() is OK
3537
navigator.userAgent is OK
3638
navigator.vendor is OK
3739
navigator.vendorSub is OK

Source/WebKitLegacy/mac/ChangeLog

+18
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
1+
2017-11-14 Jer Noble <[email protected]>
2+
3+
Enable Modern EME tests in DumpRenderTree
4+
https://bugs.webkit.org/show_bug.cgi?id=179544
5+
6+
Reviewed by Alex Christensen.
7+
8+
Add a WebPreferences property to enable the (modern) EME API.
9+
10+
* WebView/WebPreferenceKeysPrivate.h:
11+
* WebView/WebPreferences.mm:
12+
(+[WebPreferences initialize]):
13+
(-[WebPreferences encryptedMediaAPIEnabled]):
14+
(-[WebPreferences setEncryptedMediaAPIEnabled:]):
15+
* WebView/WebPreferencesPrivate.h:
16+
* WebView/WebView.mm:
17+
(-[WebView _preferencesChanged:]):
18+
119
2017-11-14 Antti Koivisto <[email protected]>
220

321
Enable display:contents by default

Source/WebKitLegacy/mac/WebView/WebPreferenceKeysPrivate.h

+1
Original file line numberDiff line numberDiff line change
@@ -249,5 +249,6 @@
249249
#define WebKitResourceTimingEnabledPreferenceKey @"WebKitResourceTimingEnabled"
250250
#define WebKitMediaContentTypesRequiringHardwareSupportPreferenceKey @"WebKitMediaContentTypesRequiringHardwareSupport"
251251
#define WebKitLegacyEncryptedMediaAPIEnabledKey @"WebKitLegacyEncryptedMediaAPIEnabled"
252+
#define WebKitEncryptedMediaAPIEnabledKey @"WebKitEncryptedMediaAPIEnabled"
252253
#define WebKitAllowMediaContentTypesRequiringHardwareSupportAsFallbackKey @"WebKitAllowMediaContentTypesRequiringHardwareSupportAsFallback"
253254
#define WebKitInspectorAdditionsEnabledPreferenceKey @"WebKitInspectorAdditionsEnabled"

Source/WebKitLegacy/mac/WebView/WebPreferences.mm

+11
Original file line numberDiff line numberDiff line change
@@ -674,6 +674,7 @@ + (void)initialize
674674
#else
675675
@YES, WebKitLegacyEncryptedMediaAPIEnabledKey,
676676
#endif
677+
@NO, WebKitEncryptedMediaAPIEnabledKey,
677678
@YES, WebKitViewportFitEnabledPreferenceKey,
678679
@YES, WebKitConstantPropertiesEnabledPreferenceKey,
679680
@YES, WebKitAllowMediaContentTypesRequiringHardwareSupportAsFallbackKey,
@@ -3205,6 +3206,16 @@ - (void)setLegacyEncryptedMediaAPIEnabled:(BOOL)flag
32053206
[self _setBoolValue:flag forKey:WebKitLegacyEncryptedMediaAPIEnabledKey];
32063207
}
32073208

3209+
- (BOOL)encryptedMediaAPIEnabled
3210+
{
3211+
return [self _boolValueForKey:WebKitEncryptedMediaAPIEnabledKey];
3212+
}
3213+
3214+
- (void)setEncryptedMediaAPIEnabled:(BOOL)flag
3215+
{
3216+
[self _setBoolValue:flag forKey:WebKitEncryptedMediaAPIEnabledKey];
3217+
}
3218+
32083219
- (BOOL)viewportFitEnabled
32093220
{
32103221
return [self _boolValueForKey:WebKitViewportFitEnabledPreferenceKey];

Source/WebKitLegacy/mac/WebView/WebPreferencesPrivate.h

+1
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,7 @@ extern NSString *WebPreferencesCacheModelChangedInternalNotification;
590590
@property (nonatomic) BOOL mediaUserGestureInheritsFromDocument;
591591
@property (nonatomic) BOOL isSecureContextAttributeEnabled;
592592
@property (nonatomic) BOOL legacyEncryptedMediaAPIEnabled;
593+
@property (nonatomic) BOOL encryptedMediaAPIEnabled;
593594
@property (nonatomic) BOOL viewportFitEnabled;
594595
@property (nonatomic) BOOL constantPropertiesEnabled;
595596
@property (nonatomic) BOOL inspectorAdditionsEnabled;

Source/WebKitLegacy/mac/WebView/WebView.mm

+4
Original file line numberDiff line numberDiff line change
@@ -3044,6 +3044,10 @@ - (void)_preferencesChanged:(WebPreferences *)preferences
30443044
RuntimeEnabledFeatures::sharedFeatures().setLegacyEncryptedMediaAPIEnabled(preferences.legacyEncryptedMediaAPIEnabled);
30453045
#endif
30463046

3047+
#if ENABLE(ENCRYPTED_MEDIA)
3048+
RuntimeEnabledFeatures::sharedFeatures().setEncryptedMediaAPIEnabled(preferences.encryptedMediaAPIEnabled);
3049+
#endif
3050+
30473051
RuntimeEnabledFeatures::sharedFeatures().setInspectorAdditionsEnabled(preferences.inspectorAdditionsEnabled);
30483052

30493053
settings.setAllowMediaContentTypesRequiringHardwareSupportAsFallback(preferences.allowMediaContentTypesRequiringHardwareSupportAsFallback);

Tools/ChangeLog

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
2017-11-14 Jer Noble <[email protected]>
2+
3+
Enable Modern EME tests in DumpRenderTree
4+
https://bugs.webkit.org/show_bug.cgi?id=179544
5+
6+
Reviewed by Alex Christensen.
7+
8+
* DumpRenderTree/mac/DumpRenderTree.mm:
9+
(enableExperimentalFeatures):
10+
111
2017-11-14 Commit Queue <[email protected]>
212

313
Unreviewed, rolling out r224800.

Tools/DumpRenderTree/mac/DumpRenderTree.mm

+1
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,7 @@ static void enableExperimentalFeatures(WebPreferences* preferences)
854854
[preferences setCacheAPIEnabled:NO];
855855
[preferences setReadableByteStreamAPIEnabled:YES];
856856
[preferences setWritableStreamAPIEnabled:YES];
857+
preferences.encryptedMediaAPIEnabled = YES;
857858
}
858859

859860
// Called before each test.

0 commit comments

Comments
 (0)