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

Unified Diff: chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc

Issue 1097383005: Add possibility to define data callback to BitmapFetcher (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@r479598_extensions_content_verifier_directories_fail
Patch Set: Clarified how calling Init/Start twice works + fixed android Created 5 years, 6 months 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/bitmap_fetcher/bitmap_fetcher_browsertest.cc
diff --git a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
index 27bd76e496dbbeb123277040d3aa7be9148eaaff..e149d756b226af2f85ffe63ac8ceaa989a763bb2 100644
--- a/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
+++ b/chrome/browser/bitmap_fetcher/bitmap_fetcher_browsertest.cc
@@ -113,11 +113,12 @@ IN_PROC_BROWSER_TEST_F(BitmapFetcherBrowserTest, StartTest) {
// We expect that the image decoder will get called and return
// an image in a callback to OnImageDecoded().
- fetcher.Start(
+ fetcher.Init(
browser()->profile()->GetRequestContext(),
std::string(),
net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
net::LOAD_NORMAL);
+ fetcher.Start();
// Blocks until test delegate is notified via a callback.
delegate.Wait();
@@ -165,11 +166,12 @@ IN_PROC_BROWSER_TEST_F(BitmapFetcherBrowserTest, OnURLFetchFailureTest) {
net::HTTP_INTERNAL_SERVER_ERROR,
net::URLRequestStatus::FAILED);
- fetcher.Start(
+ fetcher.Init(
browser()->profile()->GetRequestContext(),
std::string(),
net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
net::LOAD_NORMAL);
+ fetcher.Start();
// Blocks until test delegate is notified via a callback.
delegate.Wait();
@@ -186,11 +188,12 @@ IN_PROC_BROWSER_TEST_F(BitmapFetcherBrowserTest, HandleImageFailedTest) {
net::HTTP_OK,
net::URLRequestStatus::SUCCESS);
- fetcher.Start(
+ fetcher.Init(
browser()->profile()->GetRequestContext(),
std::string(),
net::URLRequest::CLEAR_REFERRER_ON_TRANSITION_FROM_SECURE_TO_INSECURE,
net::LOAD_NORMAL);
+ fetcher.Start();
// Blocks until test delegate is notified via a callback.
delegate.Wait();
« no previous file with comments | « chrome/browser/bitmap_fetcher/bitmap_fetcher.cc ('k') | chrome/browser/bitmap_fetcher/bitmap_fetcher_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698