| OLD | NEW |
| 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2016 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 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | 5 #ifndef NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ |
| 6 #define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | 6 #define NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ |
| 7 | 7 |
| 8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
| 9 #include "net/http/http_stream.h" | 9 #include "net/http/http_stream.h" |
| 10 #include "net/http/http_stream_factory.h" | 10 #include "net/http/http_stream_factory.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 const SSLConfig& proxy_ssl_config, | 110 const SSLConfig& proxy_ssl_config, |
| 111 HostPortPair destination, | 111 HostPortPair destination, |
| 112 GURL origin_url, | 112 GURL origin_url, |
| 113 AlternativeService alternative_service, | 113 AlternativeService alternative_service, |
| 114 NetLog* net_log); | 114 NetLog* net_log); |
| 115 | 115 |
| 116 ~MockHttpStreamFactoryImplJob() override; | 116 ~MockHttpStreamFactoryImplJob() override; |
| 117 | 117 |
| 118 MOCK_METHOD1(Start, void(HttpStreamRequest::StreamType stream_type)); | 118 MOCK_METHOD1(Start, void(HttpStreamRequest::StreamType stream_type)); |
| 119 | 119 |
| 120 MOCK_METHOD1(Resume, void(const base::TimeDelta& delay)); |
| 121 |
| 120 MOCK_METHOD1(MarkOtherJobComplete, void(const Job& job)); | 122 MOCK_METHOD1(MarkOtherJobComplete, void(const Job& job)); |
| 121 | 123 |
| 122 MOCK_METHOD0(Orphan, void()); | 124 MOCK_METHOD0(Orphan, void()); |
| 123 }; | 125 }; |
| 124 | 126 |
| 125 // JobFactory for creating MockHttpStreamFactoryImplJobs. | 127 // JobFactory for creating MockHttpStreamFactoryImplJobs. |
| 126 class TestJobFactory : public HttpStreamFactoryImpl::JobFactory { | 128 class TestJobFactory : public HttpStreamFactoryImpl::JobFactory { |
| 127 public: | 129 public: |
| 128 TestJobFactory(); | 130 TestJobFactory(); |
| 129 ~TestJobFactory() override; | 131 ~TestJobFactory() override; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 159 } | 161 } |
| 160 | 162 |
| 161 private: | 163 private: |
| 162 MockHttpStreamFactoryImplJob* main_job_; | 164 MockHttpStreamFactoryImplJob* main_job_; |
| 163 MockHttpStreamFactoryImplJob* alternative_job_; | 165 MockHttpStreamFactoryImplJob* alternative_job_; |
| 164 }; | 166 }; |
| 165 | 167 |
| 166 } // namespace net | 168 } // namespace net |
| 167 | 169 |
| 168 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ | 170 #endif // NET_HTTP_HTTP_STREAM_FACTORY_TEST_UTIL_H_ |
| OLD | NEW |