| 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 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1395 EXPECT_EQ(DataChannelInterface::kConnecting, data1->state()); | 1395 EXPECT_EQ(DataChannelInterface::kConnecting, data1->state()); |
| 1396 EXPECT_EQ(DataChannelInterface::kConnecting, data2->state()); | 1396 EXPECT_EQ(DataChannelInterface::kConnecting, data2->state()); |
| 1397 | 1397 |
| 1398 CreateOfferReceiveAnswer(); | 1398 CreateOfferReceiveAnswer(); |
| 1399 EXPECT_TRUE_WAIT(observer1->IsOpen(), kTimeout); | 1399 EXPECT_TRUE_WAIT(observer1->IsOpen(), kTimeout); |
| 1400 EXPECT_TRUE_WAIT(observer2->IsOpen(), kTimeout); | 1400 EXPECT_TRUE_WAIT(observer2->IsOpen(), kTimeout); |
| 1401 | 1401 |
| 1402 EXPECT_EQ(DataChannelInterface::kOpen, data1->state()); | 1402 EXPECT_EQ(DataChannelInterface::kOpen, data1->state()); |
| 1403 EXPECT_EQ(DataChannelInterface::kOpen, data2->state()); | 1403 EXPECT_EQ(DataChannelInterface::kOpen, data2->state()); |
| 1404 | 1404 |
| 1405 rtc::Buffer buffer("test", 4); | 1405 rtc::CopyOnWriteBuffer buffer("test", 4); |
| 1406 EXPECT_FALSE(data1->Send(DataBuffer(buffer, true))); | 1406 EXPECT_FALSE(data1->Send(DataBuffer(buffer, true))); |
| 1407 } | 1407 } |
| 1408 | 1408 |
| 1409 // This test setup a RTP data channels in loop back and test that a channel is | 1409 // This test setup a RTP data channels in loop back and test that a channel is |
| 1410 // opened even if the remote end answer with a zero SSRC. | 1410 // opened even if the remote end answer with a zero SSRC. |
| 1411 TEST_F(PeerConnectionInterfaceTest, TestSendOnlyDataChannel) { | 1411 TEST_F(PeerConnectionInterfaceTest, TestSendOnlyDataChannel) { |
| 1412 FakeConstraints constraints; | 1412 FakeConstraints constraints; |
| 1413 constraints.SetAllowRtpDataChannels(); | 1413 constraints.SetAllowRtpDataChannels(); |
| 1414 CreatePeerConnection(&constraints); | 1414 CreatePeerConnection(&constraints); |
| 1415 scoped_refptr<DataChannelInterface> data1 = | 1415 scoped_refptr<DataChannelInterface> data1 = |
| (...skipping 1191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2607 FakeConstraints updated_answer_c; | 2607 FakeConstraints updated_answer_c; |
| 2608 answer_c.SetMandatoryReceiveAudio(false); | 2608 answer_c.SetMandatoryReceiveAudio(false); |
| 2609 answer_c.SetMandatoryReceiveVideo(false); | 2609 answer_c.SetMandatoryReceiveVideo(false); |
| 2610 | 2610 |
| 2611 cricket::MediaSessionOptions updated_answer_options; | 2611 cricket::MediaSessionOptions updated_answer_options; |
| 2612 EXPECT_TRUE( | 2612 EXPECT_TRUE( |
| 2613 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); | 2613 ParseConstraintsForAnswer(&updated_answer_c, &updated_answer_options)); |
| 2614 EXPECT_TRUE(updated_answer_options.has_audio()); | 2614 EXPECT_TRUE(updated_answer_options.has_audio()); |
| 2615 EXPECT_TRUE(updated_answer_options.has_video()); | 2615 EXPECT_TRUE(updated_answer_options.has_video()); |
| 2616 } | 2616 } |
| OLD | NEW |