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

Unified Diff: chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc

Issue 1348833003: Fix NTP thumbnail generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix nit. Created 5 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/thumbnails/content_based_thumbnailing_algorithm_unittest.cc
diff --git a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc
index 2fa7ccd3bf377823b9c13022d159c72ace0e8212..df60a22c272296589d44da1b64b77fb2dbb096b3 100644
--- a/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc
+++ b/chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc
@@ -26,8 +26,8 @@ class ConsumerCallbackCatcher {
const SkBitmap& bitmap) {
called_back_ = true;
captured_bitmap_ = bitmap;
- clip_result_ = context.clip_result;
- score_ = context.score;
+ clip_result_ = context.clip_result();
+ score_ = context.score();
}
bool called_back() const {
@@ -100,7 +100,7 @@ TEST_F(ContentBasedThumbnailingAlgorithmTest, PrepareSourceBitmap) {
const gfx::Size copy_size(400, 200);
scoped_refptr<ThumbnailingContext> context(
ThumbnailingContext::CreateThumbnailingContextForTest());
- context->requested_copy_size = copy_size;
+ context->set_requested_copy_size(copy_size);
// This calls for exercising two distinct paths: with prior clipping and
// without.
@@ -109,7 +109,7 @@ TEST_F(ContentBasedThumbnailingAlgorithmTest, PrepareSourceBitmap) {
source.eraseARGB(255, 50, 150, 200);
SkBitmap result = ContentBasedThumbnailingAlgorithm::PrepareSourceBitmap(
source, thumbnail_size, context.get());
- EXPECT_EQ(CLIP_RESULT_SOURCE_SAME_AS_TARGET, context->clip_result);
+ EXPECT_EQ(CLIP_RESULT_SOURCE_SAME_AS_TARGET, context->clip_result());
EXPECT_GE(result.width(), copy_size.width());
EXPECT_GE(result.height(), copy_size.height());
EXPECT_LT(result.width(), source.width());
@@ -122,7 +122,7 @@ TEST_F(ContentBasedThumbnailingAlgorithmTest, PrepareSourceBitmap) {
result = ContentBasedThumbnailingAlgorithm::PrepareSourceBitmap(
source, thumbnail_size, context.get());
- EXPECT_EQ(CLIP_RESULT_SOURCE_SAME_AS_TARGET, context->clip_result);
+ EXPECT_EQ(CLIP_RESULT_SOURCE_SAME_AS_TARGET, context->clip_result());
EXPECT_GE(result.width(), copy_size.width());
EXPECT_GE(result.height(), copy_size.height());
EXPECT_LT(result.width(), source.width());
@@ -143,8 +143,8 @@ TEST_F(ContentBasedThumbnailingAlgorithmTest, CreateRetargetedThumbnail) {
const gfx::Size thumbnail_size(432, 284);
scoped_refptr<ThumbnailingContext> context(
ThumbnailingContext::CreateThumbnailingContextForTest());
- context->requested_copy_size = image_size;
- context->clip_result = CLIP_RESULT_SOURCE_SAME_AS_TARGET;
+ context->set_requested_copy_size(image_size);
+ context->set_clip_result(CLIP_RESULT_SOURCE_SAME_AS_TARGET);
base::MessageLoopForUI message_loop;
content::TestBrowserThread ui_thread(content::BrowserThread::UI,
« no previous file with comments | « chrome/browser/thumbnails/content_based_thumbnailing_algorithm.cc ('k') | chrome/browser/thumbnails/simple_thumbnail_crop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698