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

Unified Diff: chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.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: 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 afc8d61f27a6308537189d15c86dfc63a1282a74..4479eedbcf365b59b6347aeedd965d44cbe9fed5 100644
--- a/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc
+++ b/chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc
@@ -9,6 +9,7 @@
#include "chrome/test/base/in_process_browser_test.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_utils.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 "testing/gtest/include/gtest/gtest.h"
@@ -104,7 +105,7 @@ IN_PROC_BROWSER_TEST_F(NotificationBitmapFetcherBrowserTest,
NotificationBitmapFetcher fetcher(url, &delegate);
- url_fetcher_factory_->SetFakeResponse(url, image_string, true);
+ url_fetcher_factory_->SetFakeResponse(url, image_string, net::HTTP_OK);
// We expect that the image decoder will get called and return
// an image in a callback to OnImageDecoded().
@@ -154,7 +155,9 @@ IN_PROC_BROWSER_TEST_F(NotificationBitmapFetcherBrowserTest,
NotificationBitmapFetcher fetcher(url, &delegate);
- url_fetcher_factory_->SetFakeResponse(url, std::string(), false);
+ url_fetcher_factory_->SetFakeResponse(url,
+ std::string(),
+ net::HTTP_INTERNAL_SERVER_ERROR);
fetcher.Start(browser()->profile());
@@ -170,7 +173,7 @@ IN_PROC_BROWSER_TEST_F(NotificationBitmapFetcherBrowserTest,
NotificationBitmapFetcherTestDelegate delegate(kAsyncCall);
NotificationBitmapFetcher fetcher(url, &delegate);
url_fetcher_factory_->SetFakeResponse(
- url, std::string("Not a real bitmap"), true);
+ url, std::string("Not a real bitmap"), net::HTTP_OK);
fetcher.Start(browser()->profile());

Powered by Google App Engine
This is Rietveld 408576698