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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 501163002: Make URLRequest's constructor private, and make URLRequestContext a friend class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge yet again Created 6 years, 3 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
« no previous file with comments | « net/url_request/url_request_throttler_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 82cdf81d85c6e96a743fe2016f25b769f75c00b7..8f9c9b46a86448537ce309286b4e879f15b29c5f 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -18,6 +18,7 @@
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/format_macros.h"
+#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
@@ -1827,12 +1828,12 @@ TEST_F(URLRequestTest, InterceptLoadTimingEarlyConnectWithProxy) {
TEST_F(URLRequestTest, Identifiers) {
TestDelegate d;
TestURLRequestContext context;
- TestURLRequest req(
- GURL("http://example.com"), DEFAULT_PRIORITY, &d, &context);
- TestURLRequest other_req(
- GURL("http://example.com"), DEFAULT_PRIORITY, &d, &context);
+ scoped_ptr<URLRequest> req(context.CreateRequest(
+ GURL("http://example.com"), DEFAULT_PRIORITY, &d, NULL));
+ scoped_ptr<URLRequest> other_req(context.CreateRequest(
+ GURL("http://example.com"), DEFAULT_PRIORITY, &d, NULL));
- ASSERT_NE(req.identifier(), other_req.identifier());
+ ASSERT_NE(req->identifier(), other_req->identifier());
}
// Check that a failure to connect to the proxy is reported to the network
« no previous file with comments | « net/url_request/url_request_throttler_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698