OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/http/http_stream_factory_impl_request.h" | 5 #include "net/http/http_stream_factory_impl_request.h" |
6 | 6 |
7 #include "net/http/http_stream_factory_impl_job.h" | 7 #include "net/http/http_stream_factory_impl_job.h" |
8 #include "net/proxy/proxy_info.h" | 8 #include "net/proxy/proxy_info.h" |
9 #include "net/proxy/proxy_service.h" | 9 #include "net/proxy/proxy_service.h" |
10 #include "net/spdy/spdy_test_util_common.h" | 10 #include "net/spdy/spdy_test_util_common.h" |
11 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
12 | 12 |
13 namespace net { | 13 namespace net { |
14 | 14 |
15 class HttpStreamFactoryImplRequestTest | 15 class HttpStreamFactoryImplRequestTest |
16 : public ::testing::Test, | 16 : public ::testing::Test, |
17 public ::testing::WithParamInterface<NextProto> {}; | 17 public ::testing::WithParamInterface<NextProto> {}; |
18 | 18 |
19 INSTANTIATE_TEST_CASE_P( | 19 INSTANTIATE_TEST_CASE_P( |
20 NextProto, | 20 NextProto, |
21 HttpStreamFactoryImplRequestTest, | 21 HttpStreamFactoryImplRequestTest, |
22 testing::Values(kProtoSPDY2, kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, | 22 testing::Values(kProtoDeprecatedSPDY2, |
| 23 kProtoSPDY3, kProtoSPDY31, kProtoSPDY4a2, |
23 kProtoHTTP2Draft04)); | 24 kProtoHTTP2Draft04)); |
24 | 25 |
25 namespace { | 26 namespace { |
26 | 27 |
27 class DoNothingRequestDelegate : public HttpStreamRequest::Delegate { | 28 class DoNothingRequestDelegate : public HttpStreamRequest::Delegate { |
28 public: | 29 public: |
29 DoNothingRequestDelegate() {} | 30 DoNothingRequestDelegate() {} |
30 | 31 |
31 virtual ~DoNothingRequestDelegate() {} | 32 virtual ~DoNothingRequestDelegate() {} |
32 | 33 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 EXPECT_EQ(MEDIUM, job->priority()); | 90 EXPECT_EQ(MEDIUM, job->priority()); |
90 | 91 |
91 // Make |job| the bound job. | 92 // Make |job| the bound job. |
92 request.OnStreamFailed(job, ERR_FAILED, SSLConfig()); | 93 request.OnStreamFailed(job, ERR_FAILED, SSLConfig()); |
93 | 94 |
94 request.SetPriority(IDLE); | 95 request.SetPriority(IDLE); |
95 EXPECT_EQ(IDLE, job->priority()); | 96 EXPECT_EQ(IDLE, job->priority()); |
96 } | 97 } |
97 | 98 |
98 } // namespace net | 99 } // namespace net |
OLD | NEW |