| Index: net/http/http_stream_factory_test_util.h
|
| diff --git a/net/http/http_stream_factory_test_util.h b/net/http/http_stream_factory_test_util.h
|
| index d257b00a5cb416e134f09ea312b8fab15fb7b7e5..0b5e7a6fc1a7229d3568721967be79d4796ed7bd 100644
|
| --- a/net/http/http_stream_factory_test_util.h
|
| +++ b/net/http/http_stream_factory_test_util.h
|
| @@ -14,6 +14,9 @@
|
| #include "net/proxy/proxy_info.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| +using testing::_;
|
| +using testing::Invoke;
|
| +
|
| namespace net {
|
|
|
| class HttpStreamFactoryImplPeer {
|
| @@ -115,8 +118,15 @@ class MockHttpStreamFactoryImplJob : public HttpStreamFactoryImpl::Job {
|
|
|
| ~MockHttpStreamFactoryImplJob() override;
|
|
|
| + void UnmockedStart(HttpStreamRequest::StreamType stream_type) {
|
| + set_stream_type(stream_type);
|
| + StartInternal();
|
| + };
|
| +
|
| MOCK_METHOD1(Start, void(HttpStreamRequest::StreamType stream_type));
|
|
|
| + MOCK_METHOD0(Resume, void());
|
| +
|
| MOCK_METHOD1(MarkOtherJobComplete, void(const Job& job));
|
|
|
| MOCK_METHOD0(Orphan, void());
|
| @@ -158,9 +168,19 @@ class TestJobFactory : public HttpStreamFactoryImpl::JobFactory {
|
| return alternative_job_;
|
| }
|
|
|
| + void DisableMockStartForJobs() { disable_mocked_start_ = true; }
|
| +
|
| + void UseDifferentURLForMainJob(GURL url) {
|
| + override_main_job_url_ = true;
|
| + main_job_alternative_url_ = url;
|
| + }
|
| +
|
| private:
|
| MockHttpStreamFactoryImplJob* main_job_;
|
| MockHttpStreamFactoryImplJob* alternative_job_;
|
| + bool disable_mocked_start_;
|
| + bool override_main_job_url_;
|
| + GURL main_job_alternative_url_;
|
| };
|
|
|
| } // namespace net
|
|
|