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

Side by Side Diff: net/http/http_stream_factory_impl_request_unittest.cc

Issue 2109803002: Change a number of SPDY unittests from http to https. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
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 <memory> 7 #include <memory>
8 8
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "net/http/http_stream_factory_impl.h" 10 #include "net/http/http_stream_factory_impl.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 MockHttpStreamRequestDelegate request_delegate; 79 MockHttpStreamRequestDelegate request_delegate;
80 HttpStreamFactoryImpl::JobFactory* job_factory = 80 HttpStreamFactoryImpl::JobFactory* job_factory =
81 HttpStreamFactoryImplPeer::GetDefaultJobFactory(factory); 81 HttpStreamFactoryImplPeer::GetDefaultJobFactory(factory);
82 HttpStreamFactoryImpl::JobController* job_controller = 82 HttpStreamFactoryImpl::JobController* job_controller =
83 new HttpStreamFactoryImpl::JobController(factory, &request_delegate, 83 new HttpStreamFactoryImpl::JobController(factory, &request_delegate,
84 session.get(), job_factory); 84 session.get(), job_factory);
85 factory->job_controller_set_.insert(base::WrapUnique(job_controller)); 85 factory->job_controller_set_.insert(base::WrapUnique(job_controller));
86 86
87 HttpRequestInfo request_info; 87 HttpRequestInfo request_info;
88 request_info.method = "GET"; 88 request_info.method = "GET";
89 request_info.url = GURL("http://www.google.com"); 89 request_info.url = GURL("https://www.google.com");
90 90
91 HttpStreamFactoryImpl::Request request( 91 HttpStreamFactoryImpl::Request request(
92 request_info.url, job_controller, &request_delegate, nullptr, 92 request_info.url, job_controller, &request_delegate, nullptr,
93 BoundNetLog(), HttpStreamFactoryImpl::Request::HTTP_STREAM); 93 BoundNetLog(), HttpStreamFactoryImpl::Request::HTTP_STREAM);
94 job_controller->request_ = &request; 94 job_controller->request_ = &request;
95 95
96 HostPortPair server = HostPortPair::FromURL(request_info.url); 96 HostPortPair server = HostPortPair::FromURL(request_info.url);
97 GURL original_url = 97 GURL original_url =
98 job_controller->ApplyHostMappingRules(request_info.url, &server); 98 job_controller->ApplyHostMappingRules(request_info.url, &server);
99 99
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(wait_time + 1)); 131 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(wait_time + 1));
132 base::RunLoop().RunUntilIdle(); 132 base::RunLoop().RunUntilIdle();
133 133
134 EXPECT_NE(delay, job->wait_time_); 134 EXPECT_NE(delay, job->wait_time_);
135 EXPECT_TRUE(job->wait_time_.is_zero()); 135 EXPECT_TRUE(job->wait_time_.is_zero());
136 EXPECT_EQ(HttpStreamFactoryImpl::Job::STATE_INIT_CONNECTION_COMPLETE, 136 EXPECT_EQ(HttpStreamFactoryImpl::Job::STATE_INIT_CONNECTION_COMPLETE,
137 job->next_state_); 137 job->next_state_);
138 } 138 }
139 139
140 } // namespace net 140 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698