OLD | NEW |
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/quic/quic_http_stream.h" | 5 #include "net/quic/quic_http_stream.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/thread_task_runner_handle.h" | 9 #include "base/thread_task_runner_handle.h" |
10 #include "net/base/chunked_upload_data_stream.h" | 10 #include "net/base/chunked_upload_data_stream.h" |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 }; | 333 }; |
334 | 334 |
335 INSTANTIATE_TEST_CASE_P(Version, QuicHttpStreamTest, | 335 INSTANTIATE_TEST_CASE_P(Version, QuicHttpStreamTest, |
336 ::testing::ValuesIn(QuicSupportedVersions())); | 336 ::testing::ValuesIn(QuicSupportedVersions())); |
337 | 337 |
338 TEST_P(QuicHttpStreamTest, RenewStreamForAuth) { | 338 TEST_P(QuicHttpStreamTest, RenewStreamForAuth) { |
339 Initialize(); | 339 Initialize(); |
340 EXPECT_EQ(nullptr, stream_->RenewStreamForAuth()); | 340 EXPECT_EQ(nullptr, stream_->RenewStreamForAuth()); |
341 } | 341 } |
342 | 342 |
343 TEST_P(QuicHttpStreamTest, CanFindEndOfResponse) { | 343 TEST_P(QuicHttpStreamTest, CanReuseConnection) { |
344 Initialize(); | 344 Initialize(); |
345 EXPECT_TRUE(stream_->CanFindEndOfResponse()); | 345 EXPECT_FALSE(stream_->CanReuseConnection()); |
346 } | |
347 | |
348 TEST_P(QuicHttpStreamTest, IsConnectionReusable) { | |
349 Initialize(); | |
350 EXPECT_FALSE(stream_->IsConnectionReusable()); | |
351 } | 346 } |
352 | 347 |
353 TEST_P(QuicHttpStreamTest, GetRequest) { | 348 TEST_P(QuicHttpStreamTest, GetRequest) { |
354 SetRequest("GET", "/", DEFAULT_PRIORITY); | 349 SetRequest("GET", "/", DEFAULT_PRIORITY); |
355 AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY)); | 350 AddWrite(ConstructRequestHeadersPacket(1, kFin, DEFAULT_PRIORITY)); |
356 Initialize(); | 351 Initialize(); |
357 | 352 |
358 request_.method = "GET"; | 353 request_.method = "GET"; |
359 request_.url = GURL("http://www.google.com/"); | 354 request_.url = GURL("http://www.google.com/"); |
360 | 355 |
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 // Set Delegate to nullptr and make sure EffectivePriority returns highest | 776 // Set Delegate to nullptr and make sure EffectivePriority returns highest |
782 // priority. | 777 // priority. |
783 reliable_stream->SetDelegate(nullptr); | 778 reliable_stream->SetDelegate(nullptr); |
784 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, | 779 DCHECK_EQ(QuicWriteBlockedList::kHighestPriority, |
785 reliable_stream->EffectivePriority()); | 780 reliable_stream->EffectivePriority()); |
786 reliable_stream->SetDelegate(delegate); | 781 reliable_stream->SetDelegate(delegate); |
787 } | 782 } |
788 | 783 |
789 } // namespace test | 784 } // namespace test |
790 } // namespace net | 785 } // namespace net |
OLD | NEW |