summaryrefslogtreecommitdiffstats
path: root/chrome/browser/profile_resetter/profile_resetter_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/profile_resetter/profile_resetter_unittest.cc')
-rw-r--r--chrome/browser/profile_resetter/profile_resetter_unittest.cc19
1 files changed, 11 insertions, 8 deletions
diff --git a/chrome/browser/profile_resetter/profile_resetter_unittest.cc b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
index 27d6df8..45818a2 100644
--- a/chrome/browser/profile_resetter/profile_resetter_unittest.cc
+++ b/chrome/browser/profile_resetter/profile_resetter_unittest.cc
@@ -30,6 +30,7 @@
#include "net/http/http_response_headers.h"
#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
+#include "net/url_request/url_request_status.h"
#include "url/gurl.h"
@@ -174,7 +175,8 @@ class ConfigParserTest : public testing::Test {
const GURL& url,
net::URLFetcherDelegate* fetcher_delegate,
const std::string& response_data,
- net::HttpStatusCode response_code);
+ net::HttpStatusCode response_code,
+ net::URLRequestStatus::Status status);
MOCK_METHOD0(Callback, void(void));
@@ -214,13 +216,12 @@ scoped_ptr<net::FakeURLFetcher> ConfigParserTest::CreateFakeURLFetcher(
const GURL& url,
net::URLFetcherDelegate* fetcher_delegate,
const std::string& response_data,
- net::HttpStatusCode response_code) {
+ net::HttpStatusCode response_code,
+ net::URLRequestStatus::Status status) {
request_listener_.real_delegate = fetcher_delegate;
scoped_ptr<net::FakeURLFetcher> fetcher(
- new net::FakeURLFetcher(url,
- &request_listener_,
- response_data,
- response_code));
+ new net::FakeURLFetcher(
+ url, &request_listener_, response_data, response_code, status));
scoped_refptr<net::HttpResponseHeaders> download_headers =
new net::HttpResponseHeaders("");
download_headers->AddHeader("Content-Type: text/xml");
@@ -653,7 +654,8 @@ TEST_F(ProfileResetterTest, ResetFewFlags) {
// Tries to load unavailable config file.
TEST_F(ConfigParserTest, NoConnectivity) {
const GURL url("http://test");
- factory().SetFakeResponse(url, "", net::HTTP_INTERNAL_SERVER_ERROR);
+ factory().SetFakeResponse(url, "", net::HTTP_INTERNAL_SERVER_ERROR,
+ net::URLRequestStatus::FAILED);
scoped_ptr<BrandcodeConfigFetcher> fetcher = WaitForRequest(GURL(url));
EXPECT_FALSE(fetcher->GetSettings());
@@ -667,7 +669,8 @@ TEST_F(ConfigParserTest, ParseConfig) {
ReplaceString(&xml_config,
"placeholder_for_id",
"abbaabbaabbaabbaabbaabbaabbaabba");
- factory().SetFakeResponse(url, xml_config, net::HTTP_OK);
+ factory().SetFakeResponse(url, xml_config, net::HTTP_OK,
+ net::URLRequestStatus::SUCCESS);
scoped_ptr<BrandcodeConfigFetcher> fetcher = WaitForRequest(GURL(url));
scoped_ptr<BrandcodedDefaultSettings> settings = fetcher->GetSettings();