Chromium Code Reviews| 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 684 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 695 | 695 |
| 696 bool DoSetSessionDescription(SessionDescriptionInterface* desc, bool local) { | 696 bool DoSetSessionDescription(SessionDescriptionInterface* desc, bool local) { |
| 697 rtc::scoped_refptr<MockSetSessionDescriptionObserver> | 697 rtc::scoped_refptr<MockSetSessionDescriptionObserver> |
| 698 observer(new rtc::RefCountedObject< | 698 observer(new rtc::RefCountedObject< |
| 699 MockSetSessionDescriptionObserver>()); | 699 MockSetSessionDescriptionObserver>()); |
| 700 if (local) { | 700 if (local) { |
| 701 pc_->SetLocalDescription(observer, desc); | 701 pc_->SetLocalDescription(observer, desc); |
| 702 } else { | 702 } else { |
| 703 pc_->SetRemoteDescription(observer, desc); | 703 pc_->SetRemoteDescription(observer, desc); |
| 704 } | 704 } |
| 705 EXPECT_EQ_WAIT(true, observer->called(), kTimeout); | 705 if (pc_->signaling_state() != PeerConnectionInterface::kClosed) { |
| 706 EXPECT_EQ_WAIT(true, observer->called(), kTimeout); | |
| 707 } | |
|
pthatcher1
2016/05/12 05:44:13
Shouldn't we add some unit tests to verify the beh
| |
| 706 return observer->result(); | 708 return observer->result(); |
| 707 } | 709 } |
| 708 | 710 |
| 709 bool DoSetLocalDescription(SessionDescriptionInterface* desc) { | 711 bool DoSetLocalDescription(SessionDescriptionInterface* desc) { |
| 710 return DoSetSessionDescription(desc, true); | 712 return DoSetSessionDescription(desc, true); |
| 711 } | 713 } |
| 712 | 714 |
| 713 bool DoSetRemoteDescription(SessionDescriptionInterface* desc) { | 715 bool DoSetRemoteDescription(SessionDescriptionInterface* desc) { |
| 714 return DoSetSessionDescription(desc, false); | 716 return DoSetSessionDescription(desc, false); |
| 715 } | 717 } |
| (...skipping 1994 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2710 FakeConstraints updated_answer_c; | 2712 FakeConstraints updated_answer_c; |
| 2711 answer_c.SetMandatoryReceiveAudio(false); | 2713 answer_c.SetMandatoryReceiveAudio(false); |
| 2712 answer_c.SetMandatoryReceiveVideo(false); | 2714 answer_c.SetMandatoryReceiveVideo(false); |
| 2713 | 2715 |
| 2714 cricket::MediaSessionOptions updated_answer_options; | 2716 cricket::MediaSessionOptions updated_answer_options; |
| 2715 EXPECT_TRUE( | 2717 EXPECT_TRUE( |
| 2716 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2718 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
| 2717 EXPECT_TRUE(updated_answer_options.has_audio()); | 2719 EXPECT_TRUE(updated_answer_options.has_audio()); |
| 2718 EXPECT_TRUE(updated_answer_options.has_video()); | 2720 EXPECT_TRUE(updated_answer_options.has_video()); |
| 2719 } | 2721 } |
| OLD | NEW |