Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(31)

Side by Side Diff: webrtc/api/peerconnectioninterface_unittest.cc

Issue 1975453002: Add PeerConnection IsClosed check. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Modified the checks. Modified the peerconnectioninterface unit test. Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « webrtc/api/peerconnection.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698