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 1854 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 | 1865 |
1866 EXPECT_EQ(1u, pc_->local_streams()->count()); | 1866 EXPECT_EQ(1u, pc_->local_streams()->count()); |
1867 EXPECT_EQ(1u, pc_->remote_streams()->count()); | 1867 EXPECT_EQ(1u, pc_->remote_streams()->count()); |
1868 | 1868 |
1869 scoped_refptr<MediaStreamInterface> remote_stream = | 1869 scoped_refptr<MediaStreamInterface> remote_stream = |
1870 pc_->remote_streams()->at(0); | 1870 pc_->remote_streams()->at(0); |
1871 EXPECT_EQ(MediaStreamTrackInterface::kEnded, | 1871 EXPECT_EQ(MediaStreamTrackInterface::kEnded, |
1872 remote_stream->GetVideoTracks()[0]->state()); | 1872 remote_stream->GetVideoTracks()[0]->state()); |
1873 // Audio source state changes are posted. | 1873 // Audio source state changes are posted. |
1874 EXPECT_EQ_WAIT(MediaStreamTrackInterface::kEnded, | 1874 EXPECT_EQ_WAIT(MediaStreamTrackInterface::kEnded, |
1875 remote_stream->GetAudioTracks()[0]->state(), 1); | 1875 remote_stream->GetAudioTracks()[0]->state(), 10); |
1876 } | 1876 } |
1877 | 1877 |
1878 // Test that PeerConnection methods fails gracefully after | 1878 // Test that PeerConnection methods fails gracefully after |
1879 // PeerConnection::Close has been called. | 1879 // PeerConnection::Close has been called. |
1880 TEST_F(PeerConnectionInterfaceTest, CloseAndTestMethods) { | 1880 TEST_F(PeerConnectionInterfaceTest, CloseAndTestMethods) { |
1881 CreatePeerConnection(); | 1881 CreatePeerConnection(); |
1882 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); | 1882 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); |
1883 CreateOfferAsRemoteDescription(); | 1883 CreateOfferAsRemoteDescription(); |
1884 CreateAnswerAsLocalDescription(); | 1884 CreateAnswerAsLocalDescription(); |
1885 | 1885 |
(...skipping 850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2736 FakeConstraints updated_answer_c; | 2736 FakeConstraints updated_answer_c; |
2737 answer_c.SetMandatoryReceiveAudio(false); | 2737 answer_c.SetMandatoryReceiveAudio(false); |
2738 answer_c.SetMandatoryReceiveVideo(false); | 2738 answer_c.SetMandatoryReceiveVideo(false); |
2739 | 2739 |
2740 cricket::MediaSessionOptions updated_answer_options; | 2740 cricket::MediaSessionOptions updated_answer_options; |
2741 EXPECT_TRUE( | 2741 EXPECT_TRUE( |
2742 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2742 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
2743 EXPECT_TRUE(updated_answer_options.has_audio()); | 2743 EXPECT_TRUE(updated_answer_options.has_audio()); |
2744 EXPECT_TRUE(updated_answer_options.has_video()); | 2744 EXPECT_TRUE(updated_answer_options.has_video()); |
2745 } | 2745 } |
OLD | NEW |