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

Unified Diff: components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc

Issue 2715153006: Set desired_image_size when decoding images for NTP Tile icons. (Closed)
Patch Set: ax Created 3 years, 10 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: components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
diff --git a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
index 9dc9b61bc83fc9f6ab87509c4f460460ccf2afa8..9cdfc04ce94c2db19a04963a863021eb4de9cf51 100644
--- a/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
+++ b/components/ntp_snippets/remote/remote_suggestions_provider_impl_unittest.cc
@@ -48,6 +48,7 @@
#include "net/url_request/url_request_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/gfx/geometry/size.h"
#include "ui/gfx/image/image.h"
#include "ui/gfx/image/image_unittest_util.h"
@@ -337,6 +338,7 @@ class MockImageFetcher : public ImageFetcher {
public:
MOCK_METHOD1(SetImageFetcherDelegate, void(ImageFetcherDelegate*));
MOCK_METHOD1(SetDataUseServiceName, void(DataUseServiceName));
+ MOCK_METHOD1(SetDesiredImageFrameSize, void(const gfx::Size&));
MOCK_METHOD3(
StartOrQueueNetworkRequest,
void(const std::string&,
@@ -350,6 +352,7 @@ class FakeImageDecoder : public image_fetcher::ImageDecoder {
~FakeImageDecoder() override = default;
void DecodeImage(
const std::string& image_data,
+ const gfx::Size& desired_image_frame_size,
const image_fetcher::ImageDecodedCallback& callback) override {
callback.Run(decoded_image_);
}

Powered by Google App Engine
This is Rietveld 408576698