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

Side by Side Diff: net/tools/quic/quic_client_session_test.cc

Issue 1744103003: QuicSession::CreateIncomingDynamicStream now retains ownership of the created stream. No functional… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_server_session_base_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/tools/quic/quic_client_session.h" 5 #include "net/tools/quic/quic_client_session.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "net/base/ip_endpoint.h" 10 #include "net/base/ip_endpoint.h"
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 server_id, 62 server_id,
63 crypto_config, 63 crypto_config,
64 push_promise_index) {} 64 push_promise_index) {}
65 65
66 QuicSpdyClientStream* CreateClientStream() override { 66 QuicSpdyClientStream* CreateClientStream() override {
67 return new MockQuicSpdyClientStream(GetNextOutgoingStreamId(), this); 67 return new MockQuicSpdyClientStream(GetNextOutgoingStreamId(), this);
68 } 68 }
69 69
70 MockQuicSpdyClientStream* CreateIncomingDynamicStream( 70 MockQuicSpdyClientStream* CreateIncomingDynamicStream(
71 QuicStreamId id) override { 71 QuicStreamId id) override {
72 return new MockQuicSpdyClientStream(id, this); 72 MockQuicSpdyClientStream* stream = new MockQuicSpdyClientStream(id, this);
73 ActivateStream(stream);
74 return stream;
73 } 75 }
74 }; 76 };
75 77
76 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> { 78 class QuicClientSessionTest : public ::testing::TestWithParam<QuicVersion> {
77 protected: 79 protected:
78 QuicClientSessionTest() 80 QuicClientSessionTest()
79 : crypto_config_(CryptoTestUtils::ProofVerifierForTesting()), 81 : crypto_config_(CryptoTestUtils::ProofVerifierForTesting()),
80 promised_stream_id_(kServerDataStreamId1), 82 promised_stream_id_(kServerDataStreamId1),
81 associated_stream_id_(kClientDataStreamId1) { 83 associated_stream_id_(kClientDataStreamId1) {
82 Initialize(); 84 Initialize();
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 QuicClientPromisedInfo* promised = 514 QuicClientPromisedInfo* promised =
513 session_->GetPromisedById(promised_stream_id_); 515 session_->GetPromisedById(promised_stream_id_);
514 EXPECT_NE(promised, nullptr); 516 EXPECT_NE(promised, nullptr);
515 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr); 517 EXPECT_NE(session_->GetPromisedByUrl(promise_url_), nullptr);
516 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr); 518 EXPECT_EQ(session_->GetPromisedStream(promised_stream_id_), nullptr);
517 } 519 }
518 520
519 } // namespace 521 } // namespace
520 } // namespace test 522 } // namespace test
521 } // namespace net 523 } // namespace net
OLDNEW
« no previous file with comments | « net/tools/quic/quic_client_session.cc ('k') | net/tools/quic/quic_server_session_base_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698