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

Unified Diff: webrtc/api/quicdatachannel_unittest.cc

Issue 1934723003: Stop QuicDataChannel and QuicDataTransport unit tests from segfaulting (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | webrtc/api/quicdatatransport_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/quicdatachannel_unittest.cc
diff --git a/webrtc/api/quicdatachannel_unittest.cc b/webrtc/api/quicdatachannel_unittest.cc
index 2dd91024d0c0b841d1119eb3080420780f883a5e..1c5fc02aa9421fdb2634770f3ddab43a88ca9932 100644
--- a/webrtc/api/quicdatachannel_unittest.cc
+++ b/webrtc/api/quicdatachannel_unittest.cc
@@ -167,9 +167,9 @@ class FakeQuicDataTransport : public sigslot::has_slots<> {
class QuicDataChannelPeer {
public:
QuicDataChannelPeer()
- : ice_transport_channel_("data", 0),
- quic_transport_channel_(&ice_transport_channel_) {
- ice_transport_channel_.SetAsync(true);
+ : ice_transport_channel_(new FakeTransportChannel("data", 0)),
+ quic_transport_channel_(ice_transport_channel_) {
+ ice_transport_channel_->SetAsync(true);
fake_quic_data_transport_.ConnectToTransportChannel(
&quic_transport_channel_);
}
@@ -201,9 +201,9 @@ class QuicDataChannelPeer {
// Connects |ice_transport_channel_| to that of the other peer.
void Connect(QuicDataChannelPeer* other_peer) {
- ice_transport_channel_.Connect();
- other_peer->ice_transport_channel_.Connect();
- ice_transport_channel_.SetDestination(&other_peer->ice_transport_channel_);
+ ice_transport_channel_->Connect();
+ other_peer->ice_transport_channel_->Connect();
+ ice_transport_channel_->SetDestination(other_peer->ice_transport_channel_);
}
rtc::scoped_ptr<rtc::SSLFingerprint>& local_fingerprint() {
@@ -215,11 +215,11 @@ class QuicDataChannelPeer {
}
FakeTransportChannel* ice_transport_channel() {
- return &ice_transport_channel_;
+ return ice_transport_channel_;
}
private:
- FakeTransportChannel ice_transport_channel_;
+ FakeTransportChannel* ice_transport_channel_;
QuicTransportChannel quic_transport_channel_;
rtc::scoped_ptr<rtc::SSLFingerprint> local_fingerprint_;
« no previous file with comments | « no previous file | webrtc/api/quicdatatransport_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698