| Index: content/renderer/media/mock_peer_connection_impl.cc
|
| diff --git a/content/renderer/media/mock_peer_connection_impl.cc b/content/renderer/media/mock_peer_connection_impl.cc
|
| index 6f86e08e6c421a3bc9a422a4fda1adad35fa9bee..289e60702958f8b3a5b27618b04c0b3485feeaf4 100644
|
| --- a/content/renderer/media/mock_peer_connection_impl.cc
|
| +++ b/content/renderer/media/mock_peer_connection_impl.cc
|
| @@ -48,7 +48,9 @@ MockPeerConnectionImpl::MockPeerConnectionImpl(
|
| hint_video_(false),
|
| action_(kAnswer),
|
| ice_options_(kOnlyRelay),
|
| - ready_state_(kNew) {
|
| + sdp_mline_index_(-1),
|
| + ready_state_(kNew),
|
| + ice_state_(kIceNew) {
|
| }
|
|
|
| MockPeerConnectionImpl::~MockPeerConnectionImpl() {}
|
| @@ -149,6 +151,7 @@ void MockPeerConnectionImpl::AddRemoteStream(MediaStreamInterface* stream) {
|
| void MockPeerConnectionImpl::CreateOffer(
|
| CreateSessionDescriptionObserver* observer,
|
| const MediaConstraintsInterface* constraints) {
|
| + DCHECK(observer);
|
| NOTIMPLEMENTED();
|
| }
|
|
|
| @@ -161,31 +164,30 @@ void MockPeerConnectionImpl::CreateAnswer(
|
| void MockPeerConnectionImpl::SetLocalDescription(
|
| SetSessionDescriptionObserver* observer,
|
| SessionDescriptionInterface* desc) {
|
| - NOTIMPLEMENTED();
|
| + local_desc_.reset(desc);
|
| }
|
|
|
| void MockPeerConnectionImpl::SetRemoteDescription(
|
| SetSessionDescriptionObserver* observer,
|
| SessionDescriptionInterface* desc) {
|
| - NOTIMPLEMENTED();
|
| + remote_desc_.reset(desc);
|
| }
|
|
|
| bool MockPeerConnectionImpl::UpdateIce(
|
| const IceServers& configuration,
|
| const MediaConstraintsInterface* constraints) {
|
| - NOTIMPLEMENTED();
|
| - return false;
|
| + return true;
|
| }
|
|
|
| bool MockPeerConnectionImpl::AddIceCandidate(
|
| const IceCandidateInterface* candidate) {
|
| - NOTIMPLEMENTED();
|
| - return false;
|
| + sdp_mid_ = candidate->sdp_mid();
|
| + sdp_mline_index_ = candidate->sdp_mline_index();
|
| + return candidate->ToString(&ice_sdp_);
|
| }
|
|
|
| PeerConnectionInterface::IceState MockPeerConnectionImpl::ice_state() {
|
| - NOTIMPLEMENTED();
|
| - return kIceNew;
|
| + return ice_state_;
|
| }
|
|
|
| } // namespace webrtc
|
|
|