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

Unified Diff: components/dom_distiller/core/distiller_url_fetcher_unittest.cc

Issue 48713008: [sync] Allow FakeURLFetcher to return arbitrary HTTP response codes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 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
Index: components/dom_distiller/core/distiller_url_fetcher_unittest.cc
diff --git a/components/dom_distiller/core/distiller_url_fetcher_unittest.cc b/components/dom_distiller/core/distiller_url_fetcher_unittest.cc
index 58e58c2120e7ce48d4b5e392efcfb0a383c891e6..8dddd2f12d43df500907eda23f0eeed516303bdf 100644
--- a/components/dom_distiller/core/distiller_url_fetcher_unittest.cc
+++ b/components/dom_distiller/core/distiller_url_fetcher_unittest.cc
@@ -6,6 +6,7 @@
#include "base/bind_helpers.h"
#include "base/message_loop/message_loop.h"
#include "components/dom_distiller/core/distiller_url_fetcher.h"
+#include "net/http/http_status_code.h"
#include "net/url_request/test_url_fetcher_factory.h"
#include "net/url_request/url_fetcher.h"
#include "net/url_request/url_request_context_getter.h"
@@ -31,10 +32,12 @@ public:
factory_.reset(new net::FakeURLFetcherFactory(NULL));
factory_->SetFakeResponse(
GURL(kTestPageA),
- std::string(kTestPageAResponse, sizeof(kTestPageAResponse)), true);
+ std::string(kTestPageAResponse, sizeof(kTestPageAResponse)),
+ net::HTTP_OK);
factory_->SetFakeResponse(
GURL(kTestPageB),
- std::string(kTestPageBResponse, sizeof(kTestPageBResponse)), false);
+ std::string(kTestPageBResponse, sizeof(kTestPageBResponse)),
+ net::HTTP_INTERNAL_SERVER_ERROR);
}
void Fetch(const std::string& url,
« no previous file with comments | « chrome/service/cloud_print/printer_job_handler_unittest.cc ('k') | components/precache/core/precache_fetcher_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698