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

Unified Diff: chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc

Issue 60923002: [sync] Allow FakeURLFetcher to return an arbitrary URLRequestStatus (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: chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc
diff --git a/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc b/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc
index ceca2cf1eca309670973bded7612583f185e6cda..35a95bbe77a1b7a71ea0e704932313aea19ecf66 100644
--- a/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc
+++ b/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc
@@ -12,6 +12,7 @@
#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_status.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/skia/include/core/SkBitmap.h"
#include "ui/gfx/codec/png_codec.h"
@@ -111,7 +112,8 @@ IN_PROC_BROWSER_TEST_F(NotificationBitmapFetcherBrowserTest,
NotificationBitmapFetcher fetcher(url, &delegate);
- url_fetcher_factory_->SetFakeResponse(url, image_string, net::HTTP_OK);
+ url_fetcher_factory_->SetFakeResponse(url, image_string, net::HTTP_OK,
+ net::URLRequestStatus::SUCCESS);
// We expect that the image decoder will get called and return
// an image in a callback to OnImageDecoded().
@@ -163,7 +165,8 @@ IN_PROC_BROWSER_TEST_F(NotificationBitmapFetcherBrowserTest,
url_fetcher_factory_->SetFakeResponse(url,
std::string(),
- net::HTTP_INTERNAL_SERVER_ERROR);
+ net::HTTP_INTERNAL_SERVER_ERROR,
+ net::URLRequestStatus::FAILED);
fetcher.Start(browser()->profile());
@@ -179,7 +182,8 @@ IN_PROC_BROWSER_TEST_F(NotificationBitmapFetcherBrowserTest,
NotificationBitmapFetcherTestDelegate delegate(kAsyncCall);
NotificationBitmapFetcher fetcher(url, &delegate);
url_fetcher_factory_->SetFakeResponse(
- url, std::string("Not a real bitmap"), net::HTTP_OK);
+ url, std::string("Not a real bitmap"),
+ net::HTTP_OK, net::URLRequestStatus::SUCCESS);
fetcher.Start(browser()->profile());

Powered by Google App Engine
This is Rietveld 408576698