| OLD | NEW | 
|---|
| 1 /* | 1 /* | 
| 2  * libjingle | 2  * libjingle | 
| 3  * Copyright 2012 Google Inc. | 3  * Copyright 2012 Google Inc. | 
| 4  * | 4  * | 
| 5  * Redistribution and use in source and binary forms, with or without | 5  * Redistribution and use in source and binary forms, with or without | 
| 6  * modification, are permitted provided that the following conditions are met: | 6  * modification, are permitted provided that the following conditions are met: | 
| 7  * | 7  * | 
| 8  *  1. Redistributions of source code must retain the above copyright notice, | 8  *  1. Redistributions of source code must retain the above copyright notice, | 
| 9  *     this list of conditions and the following disclaimer. | 9  *     this list of conditions and the following disclaimer. | 
| 10  *  2. Redistributions in binary form must reproduce the above copyright notice, | 10  *  2. Redistributions in binary form must reproduce the above copyright notice, | 
| (...skipping 1971 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1982   MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); | 1982   MediaStreamInterface* remote_stream = observer_.remote_streams()->at(0); | 
| 1983 | 1983 | 
| 1984   EXPECT_EQ(1u, remote_stream->GetAudioTracks().size()); | 1984   EXPECT_EQ(1u, remote_stream->GetAudioTracks().size()); | 
| 1985   EXPECT_EQ(0u, remote_stream->GetVideoTracks().size()); | 1985   EXPECT_EQ(0u, remote_stream->GetVideoTracks().size()); | 
| 1986   EXPECT_EQ("default", remote_stream->label()); | 1986   EXPECT_EQ("default", remote_stream->label()); | 
| 1987 | 1987 | 
| 1988   CreateAndSetRemoteOffer(kSdpStringWithoutStreams); | 1988   CreateAndSetRemoteOffer(kSdpStringWithoutStreams); | 
| 1989   ASSERT_EQ(1u, observer_.remote_streams()->count()); | 1989   ASSERT_EQ(1u, observer_.remote_streams()->count()); | 
| 1990   ASSERT_EQ(1u, remote_stream->GetAudioTracks().size()); | 1990   ASSERT_EQ(1u, remote_stream->GetAudioTracks().size()); | 
| 1991   EXPECT_EQ("defaulta0", remote_stream->GetAudioTracks()[0]->id()); | 1991   EXPECT_EQ("defaulta0", remote_stream->GetAudioTracks()[0]->id()); | 
|  | 1992   EXPECT_EQ(MediaStreamTrackInterface::kLive, | 
|  | 1993             remote_stream->GetAudioTracks()[0]->state()); | 
| 1992   ASSERT_EQ(1u, remote_stream->GetVideoTracks().size()); | 1994   ASSERT_EQ(1u, remote_stream->GetVideoTracks().size()); | 
| 1993   EXPECT_EQ("defaultv0", remote_stream->GetVideoTracks()[0]->id()); | 1995   EXPECT_EQ("defaultv0", remote_stream->GetVideoTracks()[0]->id()); | 
|  | 1996   EXPECT_EQ(MediaStreamTrackInterface::kLive, | 
|  | 1997             remote_stream->GetVideoTracks()[0]->state()); | 
| 1994 } | 1998 } | 
| 1995 | 1999 | 
| 1996 // This tests that a default MediaStream is created if a remote session | 2000 // This tests that a default MediaStream is created if a remote session | 
| 1997 // description doesn't contain any streams and media direction is send only. | 2001 // description doesn't contain any streams and media direction is send only. | 
| 1998 TEST_F(PeerConnectionInterfaceTest, | 2002 TEST_F(PeerConnectionInterfaceTest, | 
| 1999        SendOnlySdpWithoutMsidCreatesDefaultStream) { | 2003        SendOnlySdpWithoutMsidCreatesDefaultStream) { | 
| 2000   FakeConstraints constraints; | 2004   FakeConstraints constraints; | 
| 2001   constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2005   constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 
| 2002                            true); | 2006                            true); | 
| 2003   CreatePeerConnection(&constraints); | 2007   CreatePeerConnection(&constraints); | 
| (...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2417   FakeConstraints updated_answer_c; | 2421   FakeConstraints updated_answer_c; | 
| 2418   answer_c.SetMandatoryReceiveAudio(false); | 2422   answer_c.SetMandatoryReceiveAudio(false); | 
| 2419   answer_c.SetMandatoryReceiveVideo(false); | 2423   answer_c.SetMandatoryReceiveVideo(false); | 
| 2420 | 2424 | 
| 2421   cricket::MediaSessionOptions updated_answer_options; | 2425   cricket::MediaSessionOptions updated_answer_options; | 
| 2422   EXPECT_TRUE( | 2426   EXPECT_TRUE( | 
| 2423       ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2427       ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 
| 2424   EXPECT_TRUE(updated_answer_options.has_audio()); | 2428   EXPECT_TRUE(updated_answer_options.has_audio()); | 
| 2425   EXPECT_TRUE(updated_answer_options.has_video()); | 2429   EXPECT_TRUE(updated_answer_options.has_video()); | 
| 2426 } | 2430 } | 
| OLD | NEW | 
|---|