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

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

Issue 24175004: Remove dependency on ui::ScaleFactor from ui/gfx (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix new usage of scale in FastShowPickler Created 7 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
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | chrome/browser/ui/app_list/fast_show_pickler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b0324a42fd4e0707e33095e14e765b8bb92a57fa..c00abb2ad3c1e2a40af93cc7b4a161db9c9cfde7 100644
--- a/chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc
+++ b/chrome/browser/thumbnails/simple_thumbnail_crop_unittest.cc
@@ -30,7 +30,7 @@ TEST_F(SimpleThumbnailCropTest, CalculateBoringScore_Empty) {
TEST_F(SimpleThumbnailCropTest, CalculateBoringScore_SingleColor) {
const gfx::Size kSize(20, 10);
- gfx::Canvas canvas(kSize, ui::SCALE_FACTOR_100P, true);
+ gfx::Canvas canvas(kSize, 1.0f, true);
// Fill all pixels in black.
canvas.FillRect(gfx::Rect(kSize), SK_ColorBLACK);
@@ -43,7 +43,7 @@ TEST_F(SimpleThumbnailCropTest, CalculateBoringScore_SingleColor) {
TEST_F(SimpleThumbnailCropTest, CalculateBoringScore_TwoColors) {
const gfx::Size kSize(20, 10);
- gfx::Canvas canvas(kSize, ui::SCALE_FACTOR_100P, true);
+ gfx::Canvas canvas(kSize, 1.0f, true);
// Fill all pixels in black.
canvas.FillRect(gfx::Rect(kSize), SK_ColorBLACK);
// Fill the left half pixels in white.
@@ -60,7 +60,7 @@ TEST_F(SimpleThumbnailCropTest, CalculateBoringScore_TwoColors) {
TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_TallerThanWide) {
// The input bitmap is vertically long.
- gfx::Canvas canvas(gfx::Size(40, 90), ui::SCALE_FACTOR_100P, true);
+ gfx::Canvas canvas(gfx::Size(40, 90), 1.0f, true);
SkBitmap bitmap =
skia::GetTopDevice(*canvas.sk_canvas())->accessBitmap(false);
@@ -77,7 +77,7 @@ TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_TallerThanWide) {
TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_WiderThanTall) {
// The input bitmap is horizontally long.
- gfx::Canvas canvas(gfx::Size(70, 40), ui::SCALE_FACTOR_100P, true);
+ gfx::Canvas canvas(gfx::Size(70, 40), 1.0f, true);
SkBitmap bitmap =
skia::GetTopDevice(*canvas.sk_canvas())->accessBitmap(false);
@@ -94,7 +94,7 @@ TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_WiderThanTall) {
TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_TooWiderThanTall) {
// The input bitmap is horizontally very long.
- gfx::Canvas canvas(gfx::Size(90, 40), ui::SCALE_FACTOR_100P, true);
+ gfx::Canvas canvas(gfx::Size(90, 40), 1.0f, true);
SkBitmap bitmap =
skia::GetTopDevice(*canvas.sk_canvas())->accessBitmap(false);
@@ -111,7 +111,7 @@ TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_TooWiderThanTall) {
TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_NotClipped) {
// The input bitmap is square.
- gfx::Canvas canvas(gfx::Size(40, 40), ui::SCALE_FACTOR_100P, true);
+ gfx::Canvas canvas(gfx::Size(40, 40), 1.0f, true);
SkBitmap bitmap =
skia::GetTopDevice(*canvas.sk_canvas())->accessBitmap(false);
@@ -128,7 +128,7 @@ TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_NotClipped) {
TEST_F(SimpleThumbnailCropTest, GetClippedBitmap_NonSquareOutput) {
// The input bitmap is square.
- gfx::Canvas canvas(gfx::Size(40, 40), ui::SCALE_FACTOR_100P, true);
+ gfx::Canvas canvas(gfx::Size(40, 40), 1.0f, true);
SkBitmap bitmap =
skia::GetTopDevice(*canvas.sk_canvas())->accessBitmap(false);
« no previous file with comments | « chrome/browser/thumbnails/simple_thumbnail_crop.cc ('k') | chrome/browser/ui/app_list/fast_show_pickler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698