Index: net/url_request/url_request_context_builder_unittest.cc |
diff --git a/net/url_request/url_request_context_builder_unittest.cc b/net/url_request/url_request_context_builder_unittest.cc |
index a7a0fee75d61c7f0024271f978b4653069e09e76..b5a3da23b39e195b46f2a5f431bc1b2357ee0edc 100644 |
--- a/net/url_request/url_request_context_builder_unittest.cc |
+++ b/net/url_request/url_request_context_builder_unittest.cc |
@@ -4,6 +4,7 @@ |
#include "net/url_request/url_request_context_builder.h" |
+#include "base/memory/scoped_ptr.h" |
#include "build/build_config.h" |
#include "net/base/request_priority.h" |
#include "net/http/http_auth_handler.h" |
@@ -79,13 +80,14 @@ TEST_F(URLRequestContextBuilderTest, DefaultSettings) { |
scoped_ptr<URLRequestContext> context(builder_.Build()); |
TestDelegate delegate; |
- URLRequest request(test_server_.GetURL("echoheader?Foo"), |
- DEFAULT_PRIORITY, |
- &delegate, |
- context.get()); |
- request.set_method("GET"); |
- request.SetExtraRequestHeaderByName("Foo", "Bar", false); |
- request.Start(); |
+ scoped_ptr<URLRequest> request( |
+ context->CreateRequest(test_server_.GetURL("echoheader?Foo"), |
+ DEFAULT_PRIORITY, |
+ &delegate, |
+ context->cookie_store())); |
+ request->set_method("GET"); |
+ request->SetExtraRequestHeaderByName("Foo", "Bar", false); |
+ request->Start(); |
base::MessageLoop::current()->Run(); |
EXPECT_EQ("Bar", delegate.data_received()); |
} |
@@ -96,12 +98,13 @@ TEST_F(URLRequestContextBuilderTest, UserAgent) { |
builder_.set_user_agent("Bar"); |
scoped_ptr<URLRequestContext> context(builder_.Build()); |
TestDelegate delegate; |
- URLRequest request(test_server_.GetURL("echoheader?User-Agent"), |
- DEFAULT_PRIORITY, |
- &delegate, |
- context.get()); |
- request.set_method("GET"); |
- request.Start(); |
+ scoped_ptr<URLRequest> request( |
+ context->CreateRequest(test_server_.GetURL("echoheader?User-Agent"), |
+ DEFAULT_PRIORITY, |
+ &delegate, |
+ NULL)); |
+ request->set_method("GET"); |
+ request->Start(); |
base::MessageLoop::current()->Run(); |
EXPECT_EQ("Bar", delegate.data_received()); |
} |