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 1559 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1570 TEST_F(PeerConnectionInterfaceTest, GetStatsForVideoTrack) { | 1570 TEST_F(PeerConnectionInterfaceTest, GetStatsForVideoTrack) { |
1571 InitiateCall(); | 1571 InitiateCall(); |
1572 ASSERT_LT(0u, pc_->remote_streams()->count()); | 1572 ASSERT_LT(0u, pc_->remote_streams()->count()); |
1573 ASSERT_LT(0u, pc_->remote_streams()->at(0)->GetVideoTracks().size()); | 1573 ASSERT_LT(0u, pc_->remote_streams()->at(0)->GetVideoTracks().size()); |
1574 rtc::scoped_refptr<MediaStreamTrackInterface> remote_video = | 1574 rtc::scoped_refptr<MediaStreamTrackInterface> remote_video = |
1575 pc_->remote_streams()->at(0)->GetVideoTracks()[0]; | 1575 pc_->remote_streams()->at(0)->GetVideoTracks()[0]; |
1576 EXPECT_TRUE(DoGetStats(remote_video)); | 1576 EXPECT_TRUE(DoGetStats(remote_video)); |
1577 } | 1577 } |
1578 | 1578 |
1579 // Test that we don't get statistics for an invalid track. | 1579 // Test that we don't get statistics for an invalid track. |
1580 // TODO(tommi): Fix this test. DoGetStats will return true | 1580 TEST_F(PeerConnectionInterfaceTest, GetStatsForInvalidTrack) { |
1581 // for the unknown track (since GetStats is async), but no | |
1582 // data is returned for the track. | |
1583 TEST_F(PeerConnectionInterfaceTest, DISABLED_GetStatsForInvalidTrack) { | |
1584 InitiateCall(); | 1581 InitiateCall(); |
1585 rtc::scoped_refptr<AudioTrackInterface> unknown_audio_track( | 1582 rtc::scoped_refptr<AudioTrackInterface> unknown_audio_track( |
1586 pc_factory_->CreateAudioTrack("unknown track", NULL)); | 1583 pc_factory_->CreateAudioTrack("unknown track", NULL)); |
1587 EXPECT_FALSE(DoGetStats(unknown_audio_track)); | 1584 EXPECT_FALSE(DoGetStats(unknown_audio_track)); |
1588 } | 1585 } |
1589 | 1586 |
1590 // This test setup two RTP data channels in loop back. | 1587 // This test setup two RTP data channels in loop back. |
1591 TEST_F(PeerConnectionInterfaceTest, TestDataChannel) { | 1588 TEST_F(PeerConnectionInterfaceTest, TestDataChannel) { |
1592 FakeConstraints constraints; | 1589 FakeConstraints constraints; |
1593 constraints.SetAllowRtpDataChannels(); | 1590 constraints.SetAllowRtpDataChannels(); |
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2892 FakeConstraints updated_answer_c; | 2889 FakeConstraints updated_answer_c; |
2893 answer_c.SetMandatoryReceiveAudio(false); | 2890 answer_c.SetMandatoryReceiveAudio(false); |
2894 answer_c.SetMandatoryReceiveVideo(false); | 2891 answer_c.SetMandatoryReceiveVideo(false); |
2895 | 2892 |
2896 cricket::MediaSessionOptions updated_answer_options; | 2893 cricket::MediaSessionOptions updated_answer_options; |
2897 EXPECT_TRUE( | 2894 EXPECT_TRUE( |
2898 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2895 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
2899 EXPECT_TRUE(updated_answer_options.has_audio()); | 2896 EXPECT_TRUE(updated_answer_options.has_audio()); |
2900 EXPECT_TRUE(updated_answer_options.has_video()); | 2897 EXPECT_TRUE(updated_answer_options.has_video()); |
2901 } | 2898 } |
OLD | NEW |