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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 9368031: Expose a static configuration value for the host to use for URLRequestTestHTTP tests. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Make overrides stackable, and other review comments. Created 8 years, 10 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_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_test_util.cc
diff --git a/net/url_request/url_request_test_util.cc b/net/url_request/url_request_test_util.cc
index c296745969d1bb288c3cde713ac2bf6c9ca97439..1969c7a51b262fc0ca586a1241d12faf4e424ce3 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -504,3 +504,21 @@ net::NetworkDelegate::AuthRequiredResponse TestNetworkDelegate::OnAuthRequired(
kStageBeforeRedirect; // a delegate can trigger a redirection
return net::NetworkDelegate::AUTH_REQUIRED_RESPONSE_NO_ACTION;
}
+
+std::string ScopedCustomUrlRequestTestHttpHost::value_("127.0.0.1");
Paweł Hajdan Jr. 2012/02/21 16:56:35 nit: // static above unless it contradicts eroman'
+
+ScopedCustomUrlRequestTestHttpHost::ScopedCustomUrlRequestTestHttpHost(
+ const std::string& new_value)
+ : new_value_(new_value),
+ old_value_(value_) {
+ value_ = new_value_;
+}
+
+ScopedCustomUrlRequestTestHttpHost::~ScopedCustomUrlRequestTestHttpHost() {
+ DCHECK_EQ(value_, new_value_);
+ value_ = old_value_;
+}
+
+const std::string& ScopedCustomUrlRequestTestHttpHost::value() {
Paweł Hajdan Jr. 2012/02/21 16:56:35 nit: // static above unless it contradicts eroman'
+ return value_;
+}
« no previous file with comments | « net/url_request/url_request_test_util.h ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698