Diff
Modified: trunk/LayoutTests/ChangeLog (214079 => 214080)
--- trunk/LayoutTests/ChangeLog 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/LayoutTests/ChangeLog 2017-03-17 00:05:36 UTC (rev 214080)
@@ -1,5 +1,15 @@
2017-03-16 Youenn Fablet <you...@apple.com>
+ Wrap legacy WebRTC API in runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=169646
+
+ Reviewed by Alex Christensen.
+
+ * webrtc/legacy-api-expected.txt: Added.
+ * webrtc/legacy-api.html: Added.
+
+2017-03-16 Youenn Fablet <you...@apple.com>
+
Rebase webrtc tests
https://bugs.webkit.org/show_bug.cgi?id=169791
Added: trunk/LayoutTests/webrtc/legacy-api-expected.txt (0 => 214080)
--- trunk/LayoutTests/webrtc/legacy-api-expected.txt (rev 0)
+++ trunk/LayoutTests/webrtc/legacy-api-expected.txt 2017-03-17 00:05:36 UTC (rev 214080)
@@ -0,0 +1,14 @@
+Summary
+
+Harness status: OK
+
+Found 1 tests
+
+1 Pass
+Details
+
+Result Test Name Message
+Pass Testing legacy API is not defined when legacy flag is turned off
+
+PASS Testing legacy API is not defined when legacy flag is turned off
+
Added: trunk/LayoutTests/webrtc/legacy-api.html (0 => 214080)
--- trunk/LayoutTests/webrtc/legacy-api.html (rev 0)
+++ trunk/LayoutTests/webrtc/legacy-api.html 2017-03-17 00:05:36 UTC (rev 214080)
@@ -0,0 +1,33 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+ <head>
+ <script src=""
+ </head>
+ <body>
+ <script>
+if (window.testRunner)
+ testRunner.setWebRTCLegacyAPIEnabled(false);
+
+promise_test(function() {
+ var pc1 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
+ var pc2 = new RTCPeerConnection({iceServers:[{urls:'stun:foo.com'}]});
+ assert_equals(pc1.getLocalStreams, undefined);
+ assert_equals(pc1.getRemoteStreams, undefined);
+ assert_equals(pc1.getStreamById, undefined);
+ assert_equals(pc1.addStream, undefined);
+ assert_equals(pc1.removeStream, undefined);
+ assert_equals(pc1.onaddstream, undefined);
+
+ var channel = pc1.createDataChannel("test");
+ return pc1.createOffer({ }, assert_unreached, assert_unreached).then((offer) => {
+ return pc1.setLocalDescription(offer, assert_unreached, assert_unreached).then(() => { return offer; });
+ }).then((offer) => {
+ return pc2.setRemoteDescription(offer, assert_unreached, assert_unreached);
+ }).then(() => {
+ return pc2.createAnswer({ }, assert_unreached, assert_unreached);
+ });
+}, "Testing legacy API is not defined when legacy flag is turned off");
+ </script>
+ <script src=""
+ </body>
+</html>
Modified: trunk/Source/WebCore/ChangeLog (214079 => 214080)
--- trunk/Source/WebCore/ChangeLog 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/ChangeLog 2017-03-17 00:05:36 UTC (rev 214080)
@@ -1,3 +1,26 @@
+2017-03-16 Youenn Fablet <you...@apple.com>
+
+ Wrap legacy WebRTC API in runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=169646
+
+ Reviewed by Alex Christensen.
+
+ Test: webrtc/legacy-api.html
+
+ Adding a runtime flag for legacy API.
+ Making some WebIDL peer connection members runtime-enabled.
+ Adding a JS private getter on this flag so that overloaded operations behave as promise-based only if flag is turned off.
+
+ * Modules/mediastream/RTCPeerConnection.idl:
+ * Modules/mediastream/RTCPeerConnectionInternals.js:
+ * bindings/js/JSDOMGlobalObject.cpp:
+ (WebCore::isWebRTCLegacyAPIEnabled):
+ (WebCore::JSDOMGlobalObject::addBuiltinGlobals):
+ * bindings/js/WebCoreBuiltinNames.h:
+ * page/RuntimeEnabledFeatures.h:
+ (WebCore::RuntimeEnabledFeatures::webRTCLegacyAPIEnabled):
+ (WebCore::RuntimeEnabledFeatures::setWebRTCLegacyAPIEnabled):
+
2017-03-16 Jiewen Tan <jiewen_...@apple.com>
[WebCrypto] Support SPKI/PKCS8 for Elliptic Curve
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl (214079 => 214080)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnection.idl 2017-03-17 00:05:36 UTC (rev 214080)
@@ -165,16 +165,14 @@
// 9.6 Identity Provider API
// FIXME 169644: missing IdP
-
// Legacy MediaStream API
- // FIXME 169646: wrap this in runtime flag
- [JSBuiltin] sequence<MediaStream> getLocalStreams();
- [PrivateIdentifier, PublicIdentifier] sequence<MediaStream> getRemoteStreams();
- [JSBuiltin] MediaStream getStreamById(DOMString streamId);
+ [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] sequence<MediaStream> getLocalStreams();
+ [PrivateIdentifier, PublicIdentifier, EnabledAtRuntime=WebRTCLegacyAPI] sequence<MediaStream> getRemoteStreams();
+ [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] MediaStream getStreamById(DOMString streamId);
- [JSBuiltin] void addStream(MediaStream stream);
- [JSBuiltin] void removeStream(MediaStream stream);
+ [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] void addStream(MediaStream stream);
+ [JSBuiltin, EnabledAtRuntime=WebRTCLegacyAPI] void removeStream(MediaStream stream);
// Legacy event handler (MediaStream-based API)
- attribute EventHandler onaddstream;
+ [EnabledAtRuntime=WebRTCLegacyAPI] attribute EventHandler onaddstream;
};
Modified: trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js (214079 => 214080)
--- trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/Modules/mediastream/RTCPeerConnectionInternals.js 2017-03-17 00:05:36 UTC (rev 214080)
@@ -88,7 +88,7 @@
if (!objectArgOk)
return @Promise.@reject(new @TypeError(`Argument 1 ('${objectInfo.argName}') to RTCPeerConnection.${functionName} must be an instance of ${objectInfo.argType}`));
- if (argsCount === 1)
+ if (!@webRTCLegacyAPIEnabled() || argsCount === 1)
return promiseMode(objectArg);
// More than one argument: Legacy mode
@@ -111,7 +111,7 @@
{
"use strict";
- if (args.length <= 1) {
+ if (!@webRTCLegacyAPIEnabled() || args.length <= 1) {
// Zero or one arguments: Promise mode
const options = args[0];
if (args.length && !@isDictionary(options))
Modified: trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp (214079 => 214080)
--- trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/bindings/js/JSDOMGlobalObject.cpp 2017-03-17 00:05:36 UTC (rev 214080)
@@ -50,6 +50,7 @@
EncodedJSValue JSC_HOST_CALL makeThisTypeErrorForBuiltins(ExecState*);
EncodedJSValue JSC_HOST_CALL makeGetterTypeErrorForBuiltins(ExecState*);
+EncodedJSValue JSC_HOST_CALL isWebRTCLegacyAPIEnabled(ExecState*);
const ClassInfo JSDOMGlobalObject::s_info = { "DOMGlobalObject", &JSGlobalObject::s_info, 0, CREATE_METHOD_TABLE(JSDOMGlobalObject) };
@@ -99,6 +100,13 @@
return JSValue::encode(createTypeError(execState, makeGetterTypeErrorMessage(interfaceName.utf8().data(), attributeName.utf8().data())));
}
+#if ENABLE(WEB_RTC)
+EncodedJSValue JSC_HOST_CALL isWebRTCLegacyAPIEnabled(ExecState*)
+{
+ return JSValue::encode(jsBoolean(RuntimeEnabledFeatures::sharedFeatures().webRTCLegacyAPIEnabled()));
+}
+#endif
+
void JSDOMGlobalObject::addBuiltinGlobals(VM& vm)
{
m_builtinInternalFunctions.initialize(*this);
@@ -155,6 +163,9 @@
#endif
JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().ReadableStreamDefaultReaderPrivateName(), privateReadableStreamDefaultReaderConstructor, DontDelete | ReadOnly),
#endif
+#if ENABLE(WEB_RTC)
+ JSDOMGlobalObject::GlobalPropertyInfo(clientData.builtinNames().webRTCLegacyAPIEnabledPrivateName(), JSFunction::create(vm, this, 0, String(), isWebRTCLegacyAPIEnabled), DontDelete | ReadOnly),
+#endif
};
addStaticGlobals(staticGlobals, WTF_ARRAY_LENGTH(staticGlobals));
}
Modified: trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h (214079 => 214080)
--- trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/bindings/js/WebCoreBuiltinNames.h 2017-03-17 00:05:36 UTC (rev 214080)
@@ -107,6 +107,7 @@
macro(underlyingSink) \
macro(underlyingSource) \
macro(view) \
+ macro(webRTCLegacyAPIEnabled) \
macro(writing) \
macro(Headers) \
macro(MediaStream) \
Modified: trunk/Source/WebCore/page/RuntimeEnabledFeatures.h (214079 => 214080)
--- trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebCore/page/RuntimeEnabledFeatures.h 2017-03-17 00:05:36 UTC (rev 214080)
@@ -96,6 +96,8 @@
#if ENABLE(WEB_RTC)
bool peerConnectionEnabled() const { return m_isPeerConnectionEnabled; }
void setPeerConnectionEnabled(bool isEnabled) { m_isPeerConnectionEnabled = isEnabled; }
+ bool webRTCLegacyAPIEnabled() const { return m_webRTCLegacyAPIEnabled; }
+ void setWebRTCLegacyAPIEnabled(bool isEnabled) { m_webRTCLegacyAPIEnabled = isEnabled; }
#endif
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
@@ -231,6 +233,7 @@
#if ENABLE(WEB_RTC)
bool m_isPeerConnectionEnabled { true };
+ bool m_webRTCLegacyAPIEnabled { true };
#endif
#if ENABLE(LEGACY_CSS_VENDOR_PREFIXES)
Modified: trunk/Source/WebKit/mac/ChangeLog (214079 => 214080)
--- trunk/Source/WebKit/mac/ChangeLog 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/ChangeLog 2017-03-17 00:05:36 UTC (rev 214080)
@@ -1,3 +1,19 @@
+2017-03-16 Youenn Fablet <you...@apple.com>
+
+ Wrap legacy WebRTC API in runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=169646
+
+ Reviewed by Alex Christensen.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences webRTCLegacyAPIEnabled]):
+ (-[WebPreferences setWebRTCLegacyAPIEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChanged:]):
+
2017-03-14 Megan Gardner <megan_gard...@apple.com>
Correctly export WebItemProviderPasteboard
Modified: trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h (214079 => 214080)
--- trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebPreferenceKeysPrivate.h 2017-03-17 00:05:36 UTC (rev 214080)
@@ -177,6 +177,7 @@
#define WebKitSubtleCryptoEnabledPreferenceKey @"WebKitSubtleCryptoEnabled"
#define WebKitMediaStreamEnabledPreferenceKey @"WebKitMediaStreamEnabled"
#define WebKitPeerConnectionEnabledPreferenceKey @"WebKitPeerConnectionEnabled"
+#define WebKitWebRTCLegacyAPIEnabledPreferenceKey @"WebKitWebRTCLegacyAPIEnabled"
#define WebKitLinkPreloadEnabledPreferenceKey @"WebKitLinkPreloadEnabled"
#define WebKitCredentialManagementEnabledPreferenceKey @"WebKitCredentialManagementEnabled"
Modified: trunk/Source/WebKit/mac/WebView/WebPreferences.mm (214079 => 214080)
--- trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebPreferences.mm 2017-03-17 00:05:36 UTC (rev 214080)
@@ -655,6 +655,7 @@
#endif
#if ENABLE(WEB_RTC)
[NSNumber numberWithBool:NO], WebKitPeerConnectionEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitWebRTCLegacyAPIEnabledPreferenceKey,
#endif
#if ENABLE(INTERSECTION_OBSERVER)
@NO, WebKitIntersectionObserverEnabledPreferenceKey,
@@ -2775,6 +2776,16 @@
[self _setBoolValue:flag forKey:WebKitPeerConnectionEnabledPreferenceKey];
}
+- (BOOL)webRTCLegacyAPIEnabled
+{
+ return [self _boolValueForKey:WebKitWebRTCLegacyAPIEnabledPreferenceKey];
+}
+
+- (void)setWebRTCLegacyAPIEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitWebRTCLegacyAPIEnabledPreferenceKey];
+}
+
- (BOOL)linkPreloadEnabled
{
return [self _boolValueForKey:WebKitLinkPreloadEnabledPreferenceKey];
Modified: trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h (214079 => 214080)
--- trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebPreferencesPrivate.h 2017-03-17 00:05:36 UTC (rev 214080)
@@ -168,6 +168,9 @@
- (void)setPeerConnectionEnabled:(BOOL)flag;
- (BOOL)peerConnectionEnabled;
+- (void)setWebRTCLegacyAPIEnabled:(BOOL)flag;
+- (BOOL)webRTCLegacyAPIEnabled;
+
#if !TARGET_OS_IPHONE
// zero means do AutoScale
- (float)PDFScaleFactor;
Modified: trunk/Source/WebKit/mac/WebView/WebView.mm (214079 => 214080)
--- trunk/Source/WebKit/mac/WebView/WebView.mm 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit/mac/WebView/WebView.mm 2017-03-17 00:05:36 UTC (rev 214080)
@@ -2867,6 +2867,7 @@
#if ENABLE(WEB_RTC)
RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled([preferences peerConnectionEnabled]);
+ RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled([preferences webRTCLegacyAPIEnabled]);
#endif
#if ENABLE(WEB_AUDIO)
Modified: trunk/Source/WebKit2/ChangeLog (214079 => 214080)
--- trunk/Source/WebKit2/ChangeLog 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/ChangeLog 2017-03-17 00:05:36 UTC (rev 214080)
@@ -1,3 +1,22 @@
+2017-03-16 Youenn Fablet <you...@apple.com>
+
+ Wrap legacy WebRTC API in runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=169646
+
+ Reviewed by Alex Christensen.
+
+ Adding preference to legacy API.
+
+ * Shared/WebPreferencesDefinitions.h:
+ * UIProcess/API/C/WKPreferences.cpp:
+ (WKPreferencesSetWebRTCLegacyAPIEnabled):
+ (WKPreferencesGetWebRTCLegacyAPIEnabled):
+ * UIProcess/API/C/WKPreferencesRef.h:
+ * WebProcess/InjectedBundle/InjectedBundle.cpp:
+ (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
+ * WebProcess/WebPage/WebPage.cpp:
+ (WebKit::WebPage::updatePreferences):
+
2017-03-16 Brady Eidson <beid...@apple.com>
Update the WKHTTPCookieStore API to be simpler and add observers.
Modified: trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h (214079 => 214080)
--- trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/Shared/WebPreferencesDefinitions.h 2017-03-17 00:05:36 UTC (rev 214080)
@@ -238,6 +238,7 @@
macro(MockCaptureDevicesEnabled, mockCaptureDevicesEnabled, Bool, bool, false, "", "") \
macro(MediaCaptureRequiresSecureConnection, mediaCaptureRequiresSecureConnection, Bool, bool, true, "", "") \
macro(EnumeratingAllNetworkInterfacesEnabled, enumeratingAllNetworkInterfacesEnabled, Bool, bool, false, "", "") \
+ macro(WebRTCLegacyAPIEnabled, webRTCLegacyAPIEnabled, Bool, bool, true, "", "") \
macro(ICECandidateFilteringEnabled, iceCandidateFilteringEnabled, Bool, bool, true, "", "") \
macro(ShadowDOMEnabled, shadowDOMEnabled, Bool, bool, true, "Shadow DOM", "HTML Shadow DOM prototype") \
macro(FetchAPIEnabled, fetchAPIEnabled, Bool, bool, true, "", "") \
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp (214079 => 214080)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferences.cpp 2017-03-17 00:05:36 UTC (rev 214080)
@@ -1351,6 +1351,16 @@
return toImpl(preferencesRef)->peerConnectionEnabled();
}
+void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled)
+{
+ toImpl(preferencesRef)->setWebRTCLegacyAPIEnabled(enabled);
+}
+
+bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef)
+{
+ return toImpl(preferencesRef)->webRTCLegacyAPIEnabled();
+}
+
void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled)
{
toImpl(preferencesRef)->setSpatialNavigationEnabled(enabled);
Modified: trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h (214079 => 214080)
--- trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/UIProcess/API/C/WKPreferencesRef.h 2017-03-17 00:05:36 UTC (rev 214080)
@@ -260,6 +260,10 @@
WK_EXPORT void WKPreferencesSetPeerConnectionEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetPeerConnectionEnabled(WKPreferencesRef preferencesRef);
+// Should default to false
+WK_EXPORT void WKPreferencesSetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef, bool enabled);
+WK_EXPORT bool WKPreferencesGetWebRTCLegacyAPIEnabled(WKPreferencesRef preferencesRef);
+
// Defaults to false.
WK_EXPORT void WKPreferencesSetSpatialNavigationEnabled(WKPreferencesRef preferencesRef, bool enabled);
WK_EXPORT bool WKPreferencesGetSpatialNavigationEnabled(WKPreferencesRef preferencesRef);
Modified: trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp (214079 => 214080)
--- trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp 2017-03-17 00:05:36 UTC (rev 214080)
@@ -237,6 +237,8 @@
#if ENABLE(WEB_RTC)
if (preference == "WebKitPeerConnectionEnabled")
RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(enabled);
+ if (preference == "WebKitWebRTCLegacyAPIEnabled")
+ RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(enabled);
#endif
// Map the names used in LayoutTests with the names used in WebCore::Settings and WebPreferencesStore.
Modified: trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp (214079 => 214080)
--- trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp 2017-03-17 00:05:36 UTC (rev 214080)
@@ -3130,6 +3130,7 @@
#if ENABLE(WEB_RTC)
RuntimeEnabledFeatures::sharedFeatures().setPeerConnectionEnabled(store.getBoolValueForKey(WebPreferencesKey::peerConnectionEnabledKey()));
+ RuntimeEnabledFeatures::sharedFeatures().setWebRTCLegacyAPIEnabled(store.getBoolValueForKey(WebPreferencesKey::webRTCLegacyAPIEnabledKey()));
#endif
#if ENABLE(SERVICE_CONTROLS)
Modified: trunk/Tools/ChangeLog (214079 => 214080)
--- trunk/Tools/ChangeLog 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/ChangeLog 2017-03-17 00:05:36 UTC (rev 214080)
@@ -1,3 +1,19 @@
+2017-03-16 Youenn Fablet <you...@apple.com>
+
+ Wrap legacy WebRTC API in runtime flag
+ https://bugs.webkit.org/show_bug.cgi?id=169646
+
+ Reviewed by Alex Christensen.
+
+ * DumpRenderTree/mac/DumpRenderTree.mm:
+ (enableExperimentalFeatures):
+ * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
+ * WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
+ (WTR::InjectedBundle::beginTesting):
+ * WebKitTestRunner/InjectedBundle/TestRunner.cpp:
+ (WTR::TestRunner::setWebRTCLegacyAPIEnabled):
+ * WebKitTestRunner/InjectedBundle/TestRunner.h:
+
2017-03-16 Brady Eidson <beid...@apple.com>
Update the WKHTTPCookieStore API to be simpler and add observers.
Modified: trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm (214079 => 214080)
--- trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/DumpRenderTree/mac/DumpRenderTree.mm 2017-03-17 00:05:36 UTC (rev 214080)
@@ -849,6 +849,7 @@
[preferences setWebGL2Enabled:YES];
[preferences setWebGPUEnabled:YES];
[preferences setPeerConnectionEnabled:YES];
+ [preferences setWebRTCLegacyAPIEnabled:YES];
[preferences setCredentialManagementEnabled:YES];
}
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl (214079 => 214080)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl 2017-03-17 00:05:36 UTC (rev 214080)
@@ -268,4 +268,6 @@
// Open panel
void setOpenPanelFiles(object filesArray);
+
+ void setWebRTCLegacyAPIEnabled(boolean value);
};
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp (214079 => 214080)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundle.cpp 2017-03-17 00:05:36 UTC (rev 214080)
@@ -345,6 +345,7 @@
m_testRunner->setMediaStreamEnabled(true);
m_testRunner->setPeerConnectionEnabled(true);
+ m_testRunner->setWebRTCLegacyAPIEnabled(true);
if (m_timeout > 0)
m_testRunner->setCustomTimeout(m_timeout);
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp (214079 => 214080)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp 2017-03-17 00:05:36 UTC (rev 214080)
@@ -381,6 +381,13 @@
WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
}
+void TestRunner::setWebRTCLegacyAPIEnabled(bool enabled)
+{
+ WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitWebRTCLegacyAPIEnabled"));
+ auto& injectedBundle = InjectedBundle::singleton();
+ WKBundleOverrideBoolPreferenceForTestRunner(injectedBundle.bundle(), injectedBundle.pageGroup(), key.get(), enabled);
+}
+
void TestRunner::setModernMediaControlsEnabled(bool enabled)
{
WKRetainPtr<WKStringRef> key(AdoptWK, WKStringCreateWithUTF8CString("WebKitModernMediaControlsEnabled"));
Modified: trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h (214079 => 214080)
--- trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2017-03-16 23:51:19 UTC (rev 214079)
+++ trunk/Tools/WebKitTestRunner/InjectedBundle/TestRunner.h 2017-03-17 00:05:36 UTC (rev 214080)
@@ -133,6 +133,7 @@
void setSubtleCryptoEnabled(bool);
void setMediaStreamEnabled(bool);
void setPeerConnectionEnabled(bool);
+ void setWebRTCLegacyAPIEnabled(bool);
// Special DOM functions.
void clearBackForwardList();