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

Unified Diff: components/ntp_tiles/icon_cacher_impl_unittest.cc

Issue 2757643002: components/image_fetcher: Expose RequestMetadata from ImageFetcher (Closed)
Patch Set: logo_bridge Created 3 years, 9 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
« no previous file with comments | « components/ntp_tiles/icon_cacher_impl.cc ('k') | components/suggestions/image_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/ntp_tiles/icon_cacher_impl_unittest.cc
diff --git a/components/ntp_tiles/icon_cacher_impl_unittest.cc b/components/ntp_tiles/icon_cacher_impl_unittest.cc
index e37174229f5a03bbc0d4f5a02048e968b491272c..8ddc056d1d45f112035db2614c7aa9aeddda494b 100644
--- a/components/ntp_tiles/icon_cacher_impl_unittest.cc
+++ b/components/ntp_tiles/icon_cacher_impl_unittest.cc
@@ -20,6 +20,7 @@
#include "components/history/core/browser/history_database_params.h"
#include "components/history/core/browser/history_service.h"
#include "components/image_fetcher/image_fetcher.h"
+#include "components/image_fetcher/request_metadata.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/resource/resource_bundle.h"
@@ -46,8 +47,7 @@ class MockImageFetcher : public image_fetcher::ImageFetcher {
MOCK_METHOD3(StartOrQueueNetworkRequest,
void(const std::string& id,
const GURL& image_url,
- base::Callback<void(const std::string& id,
- const gfx::Image& image)> callback));
+ const ImageFetcherCallback& callback));
MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&));
MOCK_METHOD0(GetImageDecoder, image_fetcher::ImageDecoder*());
};
@@ -177,12 +177,14 @@ class IconCacherTest : public ::testing::Test {
ACTION(FailFetch) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(arg2, arg0, gfx::Image()));
+ FROM_HERE,
+ base::Bind(arg2, arg0, gfx::Image(), image_fetcher::RequestMetadata()));
}
ACTION_P2(PassFetch, width, height) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
- FROM_HERE, base::Bind(arg2, arg0, gfx::test::CreateImage(width, height)));
+ FROM_HERE, base::Bind(arg2, arg0, gfx::test::CreateImage(width, height),
+ image_fetcher::RequestMetadata()));
}
ACTION_P(Quit, run_loop) {
« no previous file with comments | « components/ntp_tiles/icon_cacher_impl.cc ('k') | components/suggestions/image_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698