Index: net/spdy/spdy_network_transaction_unittest.cc |
diff --git a/net/spdy/spdy_network_transaction_unittest.cc b/net/spdy/spdy_network_transaction_unittest.cc |
index 7d301d16a734503bbfdb2af5ca5dfea9b8b0e44b..17dee75b4797069238db5b03ec7eee92e921a021 100644 |
--- a/net/spdy/spdy_network_transaction_unittest.cc |
+++ b/net/spdy/spdy_network_transaction_unittest.cc |
@@ -2482,26 +2482,27 @@ TEST_P(SpdyNetworkTransactionTest, RedirectGetRequest) { |
GetParam().protocol, |
false /* force_spdy_over_ssl*/, |
true /* force_spdy_always */); |
- net::URLRequest r(GURL("http://www.google.com/"), |
- DEFAULT_PRIORITY, |
- &d, |
- &spdy_url_request_context); |
+ scoped_ptr<URLRequest> r( |
+ spdy_url_request_context.CreateRequest(GURL("http://www.google.com/"), |
+ DEFAULT_PRIORITY, |
+ &d, |
+ NULL)); |
spdy_url_request_context.socket_factory(). |
AddSocketDataProvider(&data); |
spdy_url_request_context.socket_factory(). |
AddSocketDataProvider(&data2); |
d.set_quit_on_redirect(true); |
- r.Start(); |
+ r->Start(); |
base::RunLoop().Run(); |
EXPECT_EQ(1, d.received_redirect_count()); |
- r.FollowDeferredRedirect(); |
+ r->FollowDeferredRedirect(); |
base::RunLoop().Run(); |
EXPECT_EQ(1, d.response_started_count()); |
EXPECT_FALSE(d.received_data_before_response()); |
- EXPECT_EQ(net::URLRequestStatus::SUCCESS, r.status().status()); |
+ EXPECT_EQ(net::URLRequestStatus::SUCCESS, r->status().status()); |
std::string contents("hello!"); |
EXPECT_EQ(contents, d.data_received()); |
} |
@@ -2576,37 +2577,40 @@ TEST_P(SpdyNetworkTransactionTest, RedirectServerPush) { |
false /* force_spdy_over_ssl*/, |
true /* force_spdy_always */); |
{ |
- net::URLRequest r(GURL("http://www.google.com/"), |
- DEFAULT_PRIORITY, |
- &d, |
- &spdy_url_request_context); |
+ scoped_ptr<URLRequest> r( |
+ spdy_url_request_context.CreateRequest(GURL("http://www.google.com/"), |
+ DEFAULT_PRIORITY, |
+ &d, |
+ NULL)); |
spdy_url_request_context.socket_factory(). |
AddSocketDataProvider(&data); |
- r.Start(); |
+ r->Start(); |
base::RunLoop().Run(); |
EXPECT_EQ(0, d.received_redirect_count()); |
std::string contents("hello!"); |
EXPECT_EQ(contents, d.data_received()); |
- net::URLRequest r2(GURL("http://www.google.com/foo.dat"), |
- DEFAULT_PRIORITY, |
- &d2, |
- &spdy_url_request_context); |
+ scoped_ptr<URLRequest> r2( |
+ spdy_url_request_context.CreateRequest( |
+ GURL("http://www.google.com/foo.dat"), |
+ DEFAULT_PRIORITY, |
+ &d2, |
+ NULL)); |
spdy_url_request_context.socket_factory(). |
AddSocketDataProvider(&data2); |
d2.set_quit_on_redirect(true); |
- r2.Start(); |
+ r2->Start(); |
base::RunLoop().Run(); |
EXPECT_EQ(1, d2.received_redirect_count()); |
- r2.FollowDeferredRedirect(); |
+ r2->FollowDeferredRedirect(); |
base::RunLoop().Run(); |
EXPECT_EQ(1, d2.response_started_count()); |
EXPECT_FALSE(d2.received_data_before_response()); |
- EXPECT_EQ(net::URLRequestStatus::SUCCESS, r2.status().status()); |
+ EXPECT_EQ(net::URLRequestStatus::SUCCESS, r2->status().status()); |
std::string contents2("hello!"); |
EXPECT_EQ(contents2, d2.data_received()); |
} |