| 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 5388b4978a5c66cfae615dbfb3b34c7fe30a8f9e..34dc5cfc5f7bbaa69bfd0a71a9b52cc36011727e 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/const_http_user_agent_settings.h"
|
| #include "net/url_request/url_request_job_factory_impl.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| @@ -108,10 +109,16 @@ 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 (accept_language().empty()) {
|
| + context_storage_.set_http_user_agent_settings(
|
| + new net::ConstHttpUserAgentSettings(
|
| + "en-us,fr", accept_charset(), EmptyString()));
|
| + }
|
| + if (accept_charset().empty()) {
|
| + context_storage_.set_http_user_agent_settings(
|
| + new net::ConstHttpUserAgentSettings(
|
| + accept_language(), "iso-8859-1,*,utf-8", EmptyString()));
|
| + }
|
| if (!job_factory())
|
| context_storage_.set_job_factory(new net::URLRequestJobFactoryImpl);
|
| }
|
|
|