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

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

Issue 2503993002: Change unique_ptr::reset() for std::move (Closed)
Patch Set: Change unique_ptr::reset() for std::move Created 4 years 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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_network_transaction.h" 5 #include "net/http/http_network_transaction.h"
6 6
7 #include <math.h> // ceil 7 #include <math.h> // ceil
8 #include <stdarg.h> 8 #include <stdarg.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 8139 matching lines...) Expand 10 before | Expand all | Expand 10 after
8150 request.url = GURL("http://www.example.org/"); 8150 request.url = GURL("http://www.example.org/");
8151 push_request.method = "GET"; 8151 push_request.method = "GET";
8152 push_request.url = GURL("http://www.another-origin.com/foo.dat"); 8152 push_request.url = GURL("http://www.another-origin.com/foo.dat");
8153 8153
8154 // Configure against https proxy server "myproxy:443". 8154 // Configure against https proxy server "myproxy:443".
8155 session_deps_.proxy_service = 8155 session_deps_.proxy_service =
8156 ProxyService::CreateFixedFromPacResult("HTTPS myproxy:443"); 8156 ProxyService::CreateFixedFromPacResult("HTTPS myproxy:443");
8157 BoundTestNetLog log; 8157 BoundTestNetLog log;
8158 session_deps_.net_log = log.bound().net_log(); 8158 session_deps_.net_log = log.bound().net_log();
8159 8159
8160 session_deps_.proxy_delegate.reset(proxy_delegate.release()); 8160 session_deps_.proxy_delegate = std::move(proxy_delegate);
8161 8161
8162 std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8162 std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8163 8163
8164 SpdySerializedFrame stream1_syn( 8164 SpdySerializedFrame stream1_syn(
8165 spdy_util_.ConstructSpdyGet("http://www.example.org/", 1, LOWEST)); 8165 spdy_util_.ConstructSpdyGet("http://www.example.org/", 1, LOWEST));
8166 8166
8167 MockWrite spdy_writes[] = { 8167 MockWrite spdy_writes[] = {
8168 CreateMockWrite(stream1_syn, 0, ASYNC), 8168 CreateMockWrite(stream1_syn, 0, ASYNC),
8169 }; 8169 };
8170 8170
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
8261 8261
8262 request.method = "GET"; 8262 request.method = "GET";
8263 request.url = GURL("http://www.example.org/"); 8263 request.url = GURL("http://www.example.org/");
8264 8264
8265 session_deps_.proxy_service = 8265 session_deps_.proxy_service =
8266 ProxyService::CreateFixed("https://myproxy:443"); 8266 ProxyService::CreateFixed("https://myproxy:443");
8267 BoundTestNetLog log; 8267 BoundTestNetLog log;
8268 session_deps_.net_log = log.bound().net_log(); 8268 session_deps_.net_log = log.bound().net_log();
8269 8269
8270 // Enable cross-origin push. 8270 // Enable cross-origin push.
8271 session_deps_.proxy_delegate.reset(proxy_delegate.release()); 8271 session_deps_.proxy_delegate = std::move(proxy_delegate);
8272 8272
8273 std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8273 std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8274 8274
8275 SpdySerializedFrame stream1_syn( 8275 SpdySerializedFrame stream1_syn(
8276 spdy_util_.ConstructSpdyGet("http://www.example.org/", 1, LOWEST)); 8276 spdy_util_.ConstructSpdyGet("http://www.example.org/", 1, LOWEST));
8277 8277
8278 SpdySerializedFrame push_rst( 8278 SpdySerializedFrame push_rst(
8279 spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM)); 8279 spdy_util_.ConstructSpdyRstStream(2, RST_STREAM_REFUSED_STREAM));
8280 8280
8281 MockWrite spdy_writes[] = { 8281 MockWrite spdy_writes[] = {
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
8342 8342
8343 request.method = "GET"; 8343 request.method = "GET";
8344 request.url = GURL("http://www.example.org/"); 8344 request.url = GURL("http://www.example.org/");
8345 8345
8346 // Configure against https proxy server "myproxy:70". 8346 // Configure against https proxy server "myproxy:70".
8347 session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70"); 8347 session_deps_.proxy_service = ProxyService::CreateFixed("https://myproxy:70");
8348 BoundTestNetLog log; 8348 BoundTestNetLog log;
8349 session_deps_.net_log = log.bound().net_log(); 8349 session_deps_.net_log = log.bound().net_log();
8350 8350
8351 // Enable cross-origin push. 8351 // Enable cross-origin push.
8352 session_deps_.proxy_delegate.reset(proxy_delegate.release()); 8352 session_deps_.proxy_delegate = std::move(proxy_delegate);
8353 8353
8354 std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_)); 8354 std::unique_ptr<HttpNetworkSession> session(CreateSession(&session_deps_));
8355 8355
8356 SpdySerializedFrame stream1_syn( 8356 SpdySerializedFrame stream1_syn(
8357 spdy_util_.ConstructSpdyGet("http://www.example.org/", 1, LOWEST)); 8357 spdy_util_.ConstructSpdyGet("http://www.example.org/", 1, LOWEST));
8358 8358
8359 MockWrite spdy_writes[] = { 8359 MockWrite spdy_writes[] = {
8360 CreateMockWrite(stream1_syn, 0, ASYNC), 8360 CreateMockWrite(stream1_syn, 0, ASYNC),
8361 }; 8361 };
8362 8362
(...skipping 8138 matching lines...) Expand 10 before | Expand all | Expand 10 after
16501 base::RunLoop().RunUntilIdle(); 16501 base::RunLoop().RunUntilIdle();
16502 16502
16503 EXPECT_TRUE(trans.GetResponseInfo()->was_fetched_via_spdy); 16503 EXPECT_TRUE(trans.GetResponseInfo()->was_fetched_via_spdy);
16504 HttpRequestHeaders headers; 16504 HttpRequestHeaders headers;
16505 ASSERT_TRUE(trans.GetFullRequestHeaders(&headers)); 16505 ASSERT_TRUE(trans.GetFullRequestHeaders(&headers));
16506 EXPECT_TRUE(headers.HasHeader(HttpRequestHeaders::kTokenBinding)); 16506 EXPECT_TRUE(headers.HasHeader(HttpRequestHeaders::kTokenBinding));
16507 } 16507 }
16508 #endif // !defined(OS_IOS) 16508 #endif // !defined(OS_IOS)
16509 16509
16510 } // namespace net 16510 } // namespace net
OLDNEW
« no previous file with comments | « net/disk_cache/simple/simple_entry_impl.cc ('k') | net/http/http_stream_factory_impl_job_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698