| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 418 public: | 418 public: |
| 419 MockPeerConnectionObserver() : remote_streams_(StreamCollection::Create()) {} | 419 MockPeerConnectionObserver() : remote_streams_(StreamCollection::Create()) {} |
| 420 ~MockPeerConnectionObserver() { | 420 ~MockPeerConnectionObserver() { |
| 421 } | 421 } |
| 422 void SetPeerConnectionInterface(PeerConnectionInterface* pc) { | 422 void SetPeerConnectionInterface(PeerConnectionInterface* pc) { |
| 423 pc_ = pc; | 423 pc_ = pc; |
| 424 if (pc) { | 424 if (pc) { |
| 425 state_ = pc_->signaling_state(); | 425 state_ = pc_->signaling_state(); |
| 426 } | 426 } |
| 427 } | 427 } |
| 428 virtual void OnSignalingChange( | 428 void OnSignalingChange( |
| 429 PeerConnectionInterface::SignalingState new_state) { | 429 PeerConnectionInterface::SignalingState new_state) override { |
| 430 EXPECT_EQ(pc_->signaling_state(), new_state); | 430 EXPECT_EQ(pc_->signaling_state(), new_state); |
| 431 state_ = new_state; | 431 state_ = new_state; |
| 432 } | 432 } |
| 433 // TODO(bemasc): Remove this once callers transition to OnIceGatheringChange. | 433 // TODO(bemasc): Remove this once callers transition to OnIceGatheringChange. |
| 434 virtual void OnStateChange(StateType state_changed) { | 434 virtual void OnStateChange(StateType state_changed) { |
| 435 if (pc_.get() == NULL) | 435 if (pc_.get() == NULL) |
| 436 return; | 436 return; |
| 437 switch (state_changed) { | 437 switch (state_changed) { |
| 438 case kSignalingState: | 438 case kSignalingState: |
| 439 // OnSignalingChange and OnStateChange(kSignalingState) should always | 439 // OnSignalingChange and OnStateChange(kSignalingState) should always |
| (...skipping 2222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2662 FakeConstraints updated_answer_c; | 2662 FakeConstraints updated_answer_c; |
| 2663 answer_c.SetMandatoryReceiveAudio(false); | 2663 answer_c.SetMandatoryReceiveAudio(false); |
| 2664 answer_c.SetMandatoryReceiveVideo(false); | 2664 answer_c.SetMandatoryReceiveVideo(false); |
| 2665 | 2665 |
| 2666 cricket::MediaSessionOptions updated_answer_options; | 2666 cricket::MediaSessionOptions updated_answer_options; |
| 2667 EXPECT_TRUE( | 2667 EXPECT_TRUE( |
| 2668 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2668 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
| 2669 EXPECT_TRUE(updated_answer_options.has_audio()); | 2669 EXPECT_TRUE(updated_answer_options.has_audio()); |
| 2670 EXPECT_TRUE(updated_answer_options.has_video()); | 2670 EXPECT_TRUE(updated_answer_options.has_video()); |
| 2671 } | 2671 } |
| OLD | NEW |