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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 6698009: Add request_id to HttpRequestInfo and pass it to the NetworkDelegate for events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: test fixes Created 9 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index d0b8f582ecbcb7def053da86b7fa23134235354d..1c35a5c0e43c31886d89a42446facadaa8df1ee1 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -237,10 +237,10 @@ TEST_F(URLRequestTestHTTP, NetworkDelegateTunnelConnectionFailed) {
TestDelegate d;
{
+ TestNetworkDelegate network_delegate; // must outlive URLRequest
Matt Perry 2011/03/24 22:10:54 I had to reorder this because of the network deleg
net::URLRequest r(GURL("https://www.redirect.com/"), &d);
scoped_refptr<TestURLRequestContext> context(
new TestURLRequestContext(test_server_.host_port_pair().ToString()));
- TestNetworkDelegate network_delegate;
context->set_network_delegate(&network_delegate);
r.set_context(context);
@@ -2401,13 +2401,13 @@ TEST_F(URLRequestTest, Identifiers) {
// delegate.
TEST_F(URLRequestTest, NetworkDelegateProxyError) {
TestDelegate d;
+ TestNetworkDelegate network_delegate;
TestURLRequest req(GURL("http://example.com"), &d);
req.set_method("GET");
scoped_ptr<net::MockHostResolverBase> host_resolver(
new net::MockHostResolver);
host_resolver->rules()->AddSimulatedFailure("*");
- TestNetworkDelegate network_delegate;
scoped_refptr<TestURLRequestContext> context(
new TestURLRequestContext("myproxy:70", host_resolver.release()));
context->set_network_delegate(&network_delegate);
« net/http/http_network_transaction.cc ('K') | « net/url_request/url_request_test_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698