Don't call libwebrtc functions if libwebrtc.dylib doesn't exist while testing
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 19:30:29 +0000 (19:30 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 1 Mar 2017 19:30:29 +0000 (19:30 +0000)
commit48da9d2c31bee69048d71964ee0daba7f9d1574c
tree210225e7aba47c25ebd15290cbf3a6a3effea5d8
parentda2a3dbef2ee938b9cbcdb3603bcb373522530de
Don't call libwebrtc functions if libwebrtc.dylib doesn't exist while testing
https://bugs.webkit.org/show_bug.cgi?id=169045
<rdar://problem/30735413>

Reviewed by Youenn Fablet.

WebRTC tests fail instead of crashing now if libwebrtc.dylib is missing.
All other tests pass instead of crashing immediately when creating an Internals object.

* Modules/mediastream/RTCController.cpp:
(WebCore::RTCController::disableICECandidateFiltering):
(WebCore::RTCController::enableICECandidateFiltering):
* Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp:
(WebCore::createLibWebRTCPeerConnectionBackend):
* testing/Internals.cpp:
(WebCore::Internals::enableMockMediaEndpoint):
(WebCore::Internals::emulateRTCPeerConnectionPlatformEvent):
(WebCore::Internals::useMockRTCPeerConnectionFactory):
* testing/Internals.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213234 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/Modules/mediastream/RTCController.cpp
Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCPeerConnectionBackend.cpp
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h