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

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

Issue 2089553002: Refactoring on QUIC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Disable quic for review. Created 4 years, 6 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 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2016 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
57 57
58 private: 58 private:
59 std::vector<std::string> messages_; 59 std::vector<std::string> messages_;
60 }; 60 };
61 61
62 // A peer who uses a QUIC transport channel and fake ICE transport channel to 62 // A peer who uses a QUIC transport channel and fake ICE transport channel to
63 // send or receive data. 63 // send or receive data.
64 class QuicDataTransportPeer { 64 class QuicDataTransportPeer {
65 public: 65 public:
66 QuicDataTransportPeer() 66 QuicDataTransportPeer()
67 : quic_data_transport_(rtc::Thread::Current(), rtc::Thread::Current()), 67 : quic_data_transport_(rtc::Thread::Current(),
68 rtc::Thread::Current(),
69 rtc::Thread::Current()),
68 ice_transport_channel_(new FakeTransportChannel("data", 0)), 70 ice_transport_channel_(new FakeTransportChannel("data", 0)),
69 quic_transport_channel_(ice_transport_channel_) { 71 quic_transport_channel_(ice_transport_channel_) {
70 ice_transport_channel_->SetAsync(true); 72 ice_transport_channel_->SetAsync(true);
71 } 73 }
72 74
73 void GenerateCertificateAndFingerprint() { 75 void GenerateCertificateAndFingerprint() {
74 rtc::scoped_refptr<rtc::RTCCertificate> local_cert = 76 rtc::scoped_refptr<rtc::RTCCertificate> local_cert =
75 rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( 77 rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>(
76 rtc::SSLIdentity::Generate("cert_name", rtc::KT_DEFAULT))); 78 rtc::SSLIdentity::Generate("cert_name", rtc::KT_DEFAULT)));
77 quic_transport_channel_.SetLocalCertificate(local_cert); 79 quic_transport_channel_.SetLocalCertificate(local_cert);
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
347 QuicTransportChannel* transport_channel = peer1_.quic_transport_channel(); 349 QuicTransportChannel* transport_channel = peer1_.quic_transport_channel();
348 EXPECT_TRUE(quic_data_transport->SetTransportChannel(transport_channel)); 350 EXPECT_TRUE(quic_data_transport->SetTransportChannel(transport_channel));
349 EXPECT_TRUE(quic_data_transport->SetTransportChannel(transport_channel)); 351 EXPECT_TRUE(quic_data_transport->SetTransportChannel(transport_channel));
350 QuicTransportChannel* other_transport_channel = 352 QuicTransportChannel* other_transport_channel =
351 peer2_.quic_transport_channel(); 353 peer2_.quic_transport_channel();
352 EXPECT_FALSE( 354 EXPECT_FALSE(
353 quic_data_transport->SetTransportChannel(other_transport_channel)); 355 quic_data_transport->SetTransportChannel(other_transport_channel));
354 } 356 }
355 357
356 } // namespace 358 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698