OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 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 2640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2651 TEST_F(DataChannelTest, TestSendData) { | 2651 TEST_F(DataChannelTest, TestSendData) { |
2652 CreateChannels(0, 0); | 2652 CreateChannels(0, 0); |
2653 EXPECT_TRUE(SendInitiate()); | 2653 EXPECT_TRUE(SendInitiate()); |
2654 EXPECT_TRUE(SendAccept()); | 2654 EXPECT_TRUE(SendAccept()); |
2655 | 2655 |
2656 cricket::SendDataParams params; | 2656 cricket::SendDataParams params; |
2657 params.ssrc = 42; | 2657 params.ssrc = 42; |
2658 unsigned char data[] = { | 2658 unsigned char data[] = { |
2659 'f', 'o', 'o' | 2659 'f', 'o', 'o' |
2660 }; | 2660 }; |
2661 rtc::Buffer payload(data, 3); | 2661 rtc::CopyOnWriteBuffer payload(data, 3); |
2662 cricket::SendDataResult result; | 2662 cricket::SendDataResult result; |
2663 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 2663 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
2664 EXPECT_EQ(params.ssrc, | 2664 EXPECT_EQ(params.ssrc, |
2665 media_channel1_->last_sent_data_params().ssrc); | 2665 media_channel1_->last_sent_data_params().ssrc); |
2666 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 2666 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
2667 } | 2667 } |
2668 | 2668 |
2669 // TODO(pthatcher): TestSetReceiver? | 2669 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |