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

Side by Side Diff: net/url_request/url_request_unittest.cc

Issue 182993003: Add the ability for DevTools to wrap network transactions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Added optional QUIC setup in HttpCache constructor Created 6 years, 8 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shlobj.h> 9 #include <shlobj.h>
10 #endif 10 #endif
(...skipping 6261 matching lines...) Expand 10 before | Expand all | Expand 10 after
6272 params.ssl_config_service = default_context_.ssl_config_service(); 6272 params.ssl_config_service = default_context_.ssl_config_service();
6273 params.http_auth_handler_factory = 6273 params.http_auth_handler_factory =
6274 default_context_.http_auth_handler_factory(); 6274 default_context_.http_auth_handler_factory();
6275 params.network_delegate = &default_network_delegate_; 6275 params.network_delegate = &default_network_delegate_;
6276 params.http_server_properties = default_context_.http_server_properties(); 6276 params.http_server_properties = default_context_.http_server_properties();
6277 scoped_ptr<HttpNetworkLayer> network_layer( 6277 scoped_ptr<HttpNetworkLayer> network_layer(
6278 new HttpNetworkLayer(new HttpNetworkSession(params))); 6278 new HttpNetworkLayer(new HttpNetworkSession(params)));
6279 network_layer->OnSuspend(); 6279 network_layer->OnSuspend();
6280 6280
6281 HttpCache http_cache(network_layer.release(), default_context_.net_log(), 6281 HttpCache http_cache(network_layer.release(), default_context_.net_log(),
6282 HttpCache::DefaultBackend::InMemory(0)); 6282 HttpCache::DefaultBackend::InMemory(0), false);
6283 6283
6284 TestURLRequestContext context(true); 6284 TestURLRequestContext context(true);
6285 context.set_http_transaction_factory(&http_cache); 6285 context.set_http_transaction_factory(&http_cache);
6286 context.Init(); 6286 context.Init();
6287 6287
6288 TestDelegate d; 6288 TestDelegate d;
6289 URLRequest req(GURL("http://127.0.0.1/"), 6289 URLRequest req(GURL("http://127.0.0.1/"),
6290 DEFAULT_PRIORITY, 6290 DEFAULT_PRIORITY,
6291 &d, 6291 &d,
6292 &context); 6292 &context);
(...skipping 1624 matching lines...) Expand 10 before | Expand all | Expand 10 after
7917 7917
7918 EXPECT_FALSE(r.is_pending()); 7918 EXPECT_FALSE(r.is_pending());
7919 EXPECT_EQ(1, d->response_started_count()); 7919 EXPECT_EQ(1, d->response_started_count());
7920 EXPECT_FALSE(d->received_data_before_response()); 7920 EXPECT_FALSE(d->received_data_before_response());
7921 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size)); 7921 EXPECT_EQ(d->bytes_received(), static_cast<int>(file_size));
7922 } 7922 }
7923 } 7923 }
7924 #endif // !defined(DISABLE_FTP_SUPPORT) 7924 #endif // !defined(DISABLE_FTP_SUPPORT)
7925 7925
7926 } // namespace net 7926 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698