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

Side by Side Diff: webrtc/media/base/rtpdataengine_unittest.cc

Issue 2564333002: Reland of: Separating SCTP code from BaseChannel/MediaChannel. (Closed)
Patch Set: Merge with master. Created 3 years, 11 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
« no previous file with comments | « webrtc/media/base/rtpdataengine.cc ('k') | webrtc/media/sctp/sctpdataengine.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 return dme; 65 return dme;
66 } 66 }
67 67
68 cricket::RtpDataMediaChannel* CreateChannel() { 68 cricket::RtpDataMediaChannel* CreateChannel() {
69 return CreateChannel(dme_.get()); 69 return CreateChannel(dme_.get());
70 } 70 }
71 71
72 cricket::RtpDataMediaChannel* CreateChannel(cricket::RtpDataEngine* dme) { 72 cricket::RtpDataMediaChannel* CreateChannel(cricket::RtpDataEngine* dme) {
73 cricket::MediaConfig config; 73 cricket::MediaConfig config;
74 cricket::RtpDataMediaChannel* channel = 74 cricket::RtpDataMediaChannel* channel =
75 static_cast<cricket::RtpDataMediaChannel*>( 75 static_cast<cricket::RtpDataMediaChannel*>(dme->CreateChannel(config));
76 dme->CreateChannel(cricket::DCT_RTP, config));
77 channel->SetInterface(iface_.get()); 76 channel->SetInterface(iface_.get());
78 channel->SignalDataReceived.connect( 77 channel->SignalDataReceived.connect(
79 receiver_.get(), &FakeDataReceiver::OnDataReceived); 78 receiver_.get(), &FakeDataReceiver::OnDataReceived);
80 return channel; 79 return channel;
81 } 80 }
82 81
83 FakeDataReceiver* receiver() { 82 FakeDataReceiver* receiver() {
84 return receiver_.get(); 83 return receiver_.get();
85 } 84 }
86 85
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 0x80, 0x65, 0x00, 0x02 368 0x80, 0x65, 0x00, 0x02
370 }; 369 };
371 rtc::CopyOnWriteBuffer packet(data, sizeof(data)); 370 rtc::CopyOnWriteBuffer packet(data, sizeof(data));
372 371
373 std::unique_ptr<cricket::RtpDataMediaChannel> dmc(CreateChannel()); 372 std::unique_ptr<cricket::RtpDataMediaChannel> dmc(CreateChannel());
374 373
375 // Too short 374 // Too short
376 dmc->OnPacketReceived(&packet, rtc::PacketTime()); 375 dmc->OnPacketReceived(&packet, rtc::PacketTime());
377 EXPECT_FALSE(HasReceivedData()); 376 EXPECT_FALSE(HasReceivedData());
378 } 377 }
OLDNEW
« no previous file with comments | « webrtc/media/base/rtpdataengine.cc ('k') | webrtc/media/sctp/sctpdataengine.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698