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

Unified Diff: net/url_request/url_request_test_util.cc

Issue 10918279: Provide mutable members of UrlRequestContext via pure-virtual interface (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable test for chrome_frame_net_tests Created 8 years, 1 month 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_http_job.cc ('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 28da79f38325391edac369af2885e3e2db98d2bc..42879d5666860c6c61eaccdfc52ac03cf4a749be 100644
--- a/net/url_request/url_request_test_util.cc
+++ b/net/url_request/url_request_test_util.cc
@@ -16,6 +16,7 @@
#include "net/base/server_bound_cert_service.h"
#include "net/http/http_network_session.h"
#include "net/http/http_server_properties_impl.h"
+#include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -113,10 +114,11 @@ void TestURLRequestContext::Init() {
new net::DefaultServerBoundCertStore(NULL),
base::WorkerPool::GetTaskRunner(true)));
}
- if (accept_language().empty())
- set_accept_language("en-us,fr");
- if (accept_charset().empty())
- set_accept_charset("iso-8859-1,*,utf-8");
+ if (!http_user_agent_settings()) {
+ context_storage_.set_http_user_agent_settings(
+ new net::StaticHttpUserAgentSettings(
+ "en-us,fr", "iso-8859-1,*,utf-8", EmptyString()));
+ }
if (!job_factory())
context_storage_.set_job_factory(new net::URLRequestJobFactoryImpl);
}
« no previous file with comments | « net/url_request/url_request_http_job.cc ('k') | net/url_request/url_request_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698