haikuwebkit/LayoutTests/webrtc/legacy-api.html

31 lines
1.2 KiB
HTML
Raw Permalink Normal View History

Wrap legacy WebRTC API in runtime flag https://bugs.webkit.org/show_bug.cgi?id=169646 Patch by Youenn Fablet <youenn@apple.com> on 2017-03-16 Reviewed by Alex Christensen. Source/WebCore: 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): Source/WebKit/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences webRTCLegacyAPIEnabled]): (-[WebPreferences setWebRTCLegacyAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: 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): Tools: * 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: LayoutTests: * webrtc/legacy-api-expected.txt: Added. * webrtc/legacy-api.html: Added. Canonical link: https://commits.webkit.org/186745@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-17 00:05:36 +00:00
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<script src="../resources/testharness.js"></script>
</head>
<body>
<script>
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);
});
Remove WebRTC legacy API implementation https://bugs.webkit.org/show_bug.cgi?id=189040 Reviewed by Eric Carlson. LayoutTests/imported/w3c: * web-platform-tests/mediacapture-streams/MediaDevices-IDL-all-expected.txt: * web-platform-tests/mediacapture-streams/MediaDevices-IDL-enumerateDevices-expected.txt: * web-platform-tests/mediacapture-streams/MediaStream-default-feature-policy.https-expected.txt: * web-platform-tests/webrtc/historical-expected.txt: * web-platform-tests/webrtc/no-media-call.html: * web-platform-tests/webrtc/simplecall.https.html: Source/WebCore: This API is no longer needed as the runtime flag is off by default. Removing this option allows removing some code and will ease future WebRTC improvements. Covered by existing tests. * CMakeLists.txt: * DerivedSources.make: * Modules/mediastream/MediaStreamEvent.cpp: Removed. * Modules/mediastream/MediaStreamEvent.h: Removed. * Modules/mediastream/MediaStreamEvent.idl: Removed. * Modules/mediastream/NavigatorUserMedia.idl: Removed. * Modules/mediastream/NavigatorUserMedia.js: Removed. * Modules/mediastream/PeerConnectionBackend.cpp: * Modules/mediastream/PeerConnectionBackend.h: * Modules/mediastream/RTCPeerConnection.h: * Modules/mediastream/RTCPeerConnection.idl: * Modules/mediastream/RTCPeerConnection.js: (initializeRTCPeerConnection): (createOffer): (createAnswer): (setLocalDescription): (setRemoteDescription): (addIceCandidate): (getLocalStreams): Deleted. (getStreamById): Deleted. (addStream): Deleted. (): Deleted. * Modules/mediastream/RTCPeerConnectionInternals.js: (callbacksAndDictionaryOverload): (if): Deleted. * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.cpp: (WebCore::LibWebRTCMediaEndpoint::mediaStreamFromRTCStream): (WebCore::LibWebRTCMediaEndpoint::addRemoteStream): (WebCore::LibWebRTCMediaEndpoint::removeRemoteStream): * Modules/mediastream/libwebrtc/LibWebRTCMediaEndpoint.h: * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp: (WebCore::LibWebRTCPeerConnectionBackend::doStop): (WebCore::LibWebRTCPeerConnectionBackend::removeRemoteStream): Deleted. (WebCore::LibWebRTCPeerConnectionBackend::addRemoteStream): Deleted. * Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.h: * Sources.txt: * WebCore.xcodeproj/project.pbxproj: * bindings/js/JSDOMGlobalObject.cpp: (WebCore::JSDOMGlobalObject::addBuiltinGlobals): (WebCore::isWebRTCLegacyAPIEnabled): Deleted. * bindings/js/WebCoreBuiltinNames.h: * dom/EventNames.in: * page/RuntimeEnabledFeatures.h: (WebCore::RuntimeEnabledFeatures::setPeerConnectionEnabled): (WebCore::RuntimeEnabledFeatures::webRTCLegacyAPIEnabled const): Deleted. (WebCore::RuntimeEnabledFeatures::setWebRTCLegacyAPIEnabled): Deleted. Source/WebKit: * Shared/WebPreferences.yaml: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetWebRTCLegacyAPIEnabled): Deleted. (WKPreferencesGetWebRTCLegacyAPIEnabled): Deleted. * UIProcess/API/C/WKPreferencesRef.h: * UIProcess/API/Cocoa/WKPreferences.mm: (-[WKPreferences _webRTCLegacyAPIEnabled]): Deleted. (-[WKPreferences _setWebRTCLegacyAPIEnabled:]): Deleted. * UIProcess/API/Cocoa/WKPreferencesPrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Source/WebKitLegacy/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences webRTCLegacyAPIEnabled]): Deleted. (-[WebPreferences setWebRTCLegacyAPIEnabled:]): Deleted. * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Tools: * DumpRenderTree/mac/DumpRenderTree.mm: (enableExperimentalFeatures): * WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: * WebKitTestRunner/InjectedBundle/TestRunner.cpp: (WTR::TestRunner::setWebRTCLegacyAPIEnabled): Deleted. * WebKitTestRunner/InjectedBundle/TestRunner.h: * WebKitTestRunner/TestController.cpp: (WTR::TestController::resetPreferencesToConsistentValues): LayoutTests: * TestExpectations: * fast/events/constructors/media-stream-event-constructor-expected.txt: Removed. * fast/events/constructors/media-stream-event-constructor.html: Removed. * fast/mediastream/RTCPeerConnection-AddRemoveStream-expected.txt: Removed. * fast/mediastream/RTCPeerConnection-AddRemoveStream.html: Removed. * fast/mediastream/RTCPeerConnection-createAnswer-expected.txt: * fast/mediastream/RTCPeerConnection-createAnswer.html: * fast/mediastream/RTCPeerConnection-createOffer-expected.txt: Removed. * fast/mediastream/RTCPeerConnection-createOffer.html: Removed. * fast/mediastream/RTCPeerConnection-dtmf.html: Removed. * fast/mediastream/RTCPeerConnection-events-expected.txt: Removed. * fast/mediastream/RTCPeerConnection-events.html: Removed. * fast/mediastream/RTCPeerConnection-have-local-offer-expected.txt: * fast/mediastream/RTCPeerConnection-have-local-offer.html: * fast/mediastream/RTCPeerConnection-have-local-pranswer-expected.txt: * fast/mediastream/RTCPeerConnection-have-local-pranswer.html: * fast/mediastream/RTCPeerConnection-have-remote-offer-expected.txt: * fast/mediastream/RTCPeerConnection-have-remote-offer.html: * fast/mediastream/RTCPeerConnection-have-remote-pranswer-expected.txt: * fast/mediastream/RTCPeerConnection-have-remote-pranswer.html: * fast/mediastream/RTCPeerConnection-legacy-stream-based-api-expected.txt: Removed. * fast/mediastream/RTCPeerConnection-legacy-stream-based-api.html: Removed. * fast/mediastream/RTCPeerConnection-localDescription-expected.txt: * fast/mediastream/RTCPeerConnection-localDescription.html: * fast/mediastream/RTCPeerConnection-remoteDescription-expected.txt: * fast/mediastream/RTCPeerConnection-remoteDescription.html: * fast/mediastream/RTCPeerConnection-stable-expected.txt: * fast/mediastream/RTCPeerConnection-stable.html: * fast/mediastream/RTCPeerConnection-stats.html: * fast/mediastream/RTCPeerConnection-statsSelector-expected.txt: * fast/mediastream/RTCPeerConnection-statsSelector.html: * fast/mediastream/argument-types-expected.txt: Removed. * fast/mediastream/argument-types.html: Removed. * fast/mediastream/getusermedia-expected.txt: Removed. * fast/mediastream/getusermedia.html: Removed. * fast/mediastream/webkitGetUserMedia-shadowing-then-expected.txt: Removed. * fast/mediastream/webkitGetUserMedia-shadowing-then.html: Removed. * platform/mac/TestExpectations: * webrtc/legacy-api-expected.txt: * webrtc/legacy-api.html: Canonical link: https://commits.webkit.org/204136@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235484 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2018-08-29 22:42:26 +00:00
}, "Testing legacy API is not defined");
Wrap legacy WebRTC API in runtime flag https://bugs.webkit.org/show_bug.cgi?id=169646 Patch by Youenn Fablet <youenn@apple.com> on 2017-03-16 Reviewed by Alex Christensen. Source/WebCore: 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): Source/WebKit/mac: * WebView/WebPreferenceKeysPrivate.h: * WebView/WebPreferences.mm: (+[WebPreferences initialize]): (-[WebPreferences webRTCLegacyAPIEnabled]): (-[WebPreferences setWebRTCLegacyAPIEnabled:]): * WebView/WebPreferencesPrivate.h: * WebView/WebView.mm: (-[WebView _preferencesChanged:]): Source/WebKit2: 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): Tools: * 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: LayoutTests: * webrtc/legacy-api-expected.txt: Added. * webrtc/legacy-api.html: Added. Canonical link: https://commits.webkit.org/186745@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214080 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-17 00:05:36 +00:00
</script>
<script src="../resources/testharnessreport.js"></script>
</body>
</html>