Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(308)

Side by Side Diff: webrtc/api/webrtcsession_unittest.cc

Issue 1823503002: Reland Use CopyOnWriteBuffer instead of Buffer to avoid unnecessary copies. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 4036 matching lines...) Expand 10 before | Expand all | Expand 10 after
4047 TEST_P(WebRtcSessionTest, TestSctpDataChannelOpenMessage) { 4047 TEST_P(WebRtcSessionTest, TestSctpDataChannelOpenMessage) {
4048 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); 4048 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
4049 4049
4050 InitWithDtls(GetParam()); 4050 InitWithDtls(GetParam());
4051 4051
4052 SetLocalDescriptionWithDataChannel(); 4052 SetLocalDescriptionWithDataChannel();
4053 EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type()); 4053 EXPECT_EQ(cricket::DCT_SCTP, data_engine_->last_channel_type());
4054 4054
4055 webrtc::DataChannelInit config; 4055 webrtc::DataChannelInit config;
4056 config.id = 1; 4056 config.id = 1;
4057 rtc::Buffer payload; 4057 rtc::CopyOnWriteBuffer payload;
4058 webrtc::WriteDataChannelOpenMessage("a", config, &payload); 4058 webrtc::WriteDataChannelOpenMessage("a", config, &payload);
4059 cricket::ReceiveDataParams params; 4059 cricket::ReceiveDataParams params;
4060 params.ssrc = config.id; 4060 params.ssrc = config.id;
4061 params.type = cricket::DMT_CONTROL; 4061 params.type = cricket::DMT_CONTROL;
4062 4062
4063 cricket::DataChannel* data_channel = session_->data_channel(); 4063 cricket::DataChannel* data_channel = session_->data_channel();
4064 data_channel->SignalDataReceived(data_channel, params, payload); 4064 data_channel->SignalDataReceived(data_channel, params, payload);
4065 4065
4066 EXPECT_EQ("a", last_data_channel_label_); 4066 EXPECT_EQ("a", last_data_channel_label_);
4067 EXPECT_EQ(config.id, last_data_channel_config_.id); 4067 EXPECT_EQ(config.id, last_data_channel_config_.id);
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
4394 } 4394 }
4395 4395
4396 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test 4396 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test
4397 // currently fails because upon disconnection and reconnection OnIceComplete is 4397 // currently fails because upon disconnection and reconnection OnIceComplete is
4398 // called more than once without returning to IceGatheringGathering. 4398 // called more than once without returning to IceGatheringGathering.
4399 4399
4400 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, 4400 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests,
4401 WebRtcSessionTest, 4401 WebRtcSessionTest,
4402 testing::Values(ALREADY_GENERATED, 4402 testing::Values(ALREADY_GENERATED,
4403 DTLS_IDENTITY_STORE)); 4403 DTLS_IDENTITY_STORE));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698