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

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

Issue 1357423009: gfx: Make conversions from Size to SizeF be explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sizefconvert-gfx: . Created 5 years, 3 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/thumbnails/simple_thumbnail_crop_unittest.cc
diff --git a/chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc b/chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc
index 1fe9d6f75794bd07a6b4feac2435fd9c156ebe63..e7c7a2b8943ac26c526e73569293ec72d1c365ae 100644
--- a/chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc
+++ b/chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc
@@ -110,8 +110,7 @@ TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_NonSquareOutput) {
TEST_F(SimpleThumbnailCropTest, GetCanvasCopyInfo) {
gfx::Size thumbnail_size(200, 120);
- gfx::Size expected_2x_size =
- gfx::ToFlooredSize(gfx::ScaleSize(thumbnail_size, 2.0));
+ gfx::Size expected_2x_size = gfx::ScaleToFlooredSize(thumbnail_size, 2.0);
float desired_aspect =
static_cast<float>(thumbnail_size.width()) / thumbnail_size.height();
scoped_refptr<thumbnails::ThumbnailingAlgorithm> algorithm(
@@ -172,8 +171,7 @@ TEST_F(SimpleThumbnailCropTest, GetCanvasCopyInfoDifferentScales) {
gfx::Rect clipping_rect_result;
gfx::Size target_size_result;
- gfx::Size expected_2x_size =
- gfx::ToFlooredSize(gfx::ScaleSize(thumbnail_size, 2.0));
+ gfx::Size expected_2x_size = gfx::ScaleToFlooredSize(thumbnail_size, 2.0);
// Test at 1x scale. Expect a 2x thumbnail (we do this for quality).
algorithm->GetCanvasCopyInfo(gfx::Size(400, 210), ui::SCALE_FACTOR_100P,
@@ -186,8 +184,7 @@ TEST_F(SimpleThumbnailCropTest, GetCanvasCopyInfoDifferentScales) {
EXPECT_EQ(expected_2x_size, target_size_result);
// Test at 3x scale.
- gfx::Size expected_3x_size =
- gfx::ToFlooredSize(gfx::ScaleSize(thumbnail_size, 3.0));
+ gfx::Size expected_3x_size = gfx::ScaleToFlooredSize(thumbnail_size, 3.0);
algorithm->GetCanvasCopyInfo(gfx::Size(400, 210), ui::SCALE_FACTOR_300P,
&clipping_rect_result, &target_size_result);
EXPECT_EQ(expected_3x_size, target_size_result);
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | chrome/browser/ui/libgtk2ui/printing_gtk2_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698