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 2751 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2762 TEST_F(DataChannelTest, TestSendData) { | 2762 TEST_F(DataChannelTest, TestSendData) { |
2763 CreateChannels(0, 0); | 2763 CreateChannels(0, 0); |
2764 EXPECT_TRUE(SendInitiate()); | 2764 EXPECT_TRUE(SendInitiate()); |
2765 EXPECT_TRUE(SendAccept()); | 2765 EXPECT_TRUE(SendAccept()); |
2766 | 2766 |
2767 cricket::SendDataParams params; | 2767 cricket::SendDataParams params; |
2768 params.ssrc = 42; | 2768 params.ssrc = 42; |
2769 unsigned char data[] = { | 2769 unsigned char data[] = { |
2770 'f', 'o', 'o' | 2770 'f', 'o', 'o' |
2771 }; | 2771 }; |
2772 rtc::Buffer payload(data, 3); | 2772 rtc::CopyOnWriteBuffer payload(data, 3); |
2773 cricket::SendDataResult result; | 2773 cricket::SendDataResult result; |
2774 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); | 2774 ASSERT_TRUE(media_channel1_->SendData(params, payload, &result)); |
2775 EXPECT_EQ(params.ssrc, | 2775 EXPECT_EQ(params.ssrc, |
2776 media_channel1_->last_sent_data_params().ssrc); | 2776 media_channel1_->last_sent_data_params().ssrc); |
2777 EXPECT_EQ("foo", media_channel1_->last_sent_data()); | 2777 EXPECT_EQ("foo", media_channel1_->last_sent_data()); |
2778 } | 2778 } |
2779 | 2779 |
2780 // TODO(pthatcher): TestSetReceiver? | 2780 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |