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

Unified Diff: chrome/browser/tab_contents/thumbnail_generator_unittest.cc

Issue 7019013: Removal of dependencies on PlatformDevice classes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Remove unnecessary headers. Created 9 years, 7 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/tab_contents/thumbnail_generator_unittest.cc
===================================================================
--- chrome/browser/tab_contents/thumbnail_generator_unittest.cc (revision 85672)
+++ chrome/browser/tab_contents/thumbnail_generator_unittest.cc (working copy)
@@ -103,11 +103,11 @@
transport_dib_->GetPlatformCanvas(kBitmapWidth, kBitmapHeight));
switch (type) {
case TRANSPORT_BLACK:
- canvas->getTopPlatformDevice().accessBitmap(true).eraseARGB(
+ canvas->getTopDevice().accessBitmap(true).eraseARGB(
0xFF, 0, 0, 0);
break;
case TRANSPORT_WHITE:
- canvas->getTopPlatformDevice().accessBitmap(true).eraseARGB(
+ canvas->getTopDevice().accessBitmap(true).eraseARGB(
0xFF, 0xFF, 0xFF, 0xFF);
break;
case TRANSPORT_OTHER:
@@ -211,7 +211,7 @@
// Fill all pixesl in black.
canvas.FillRectInt(kBlack, 0, 0, kSize.width(), kSize.height());
- SkBitmap bitmap = canvas.getTopPlatformDevice().accessBitmap(false);
+ SkBitmap bitmap = canvas.getTopDevice().accessBitmap(false);
// The thumbnail should deserve the highest boring score.
EXPECT_DOUBLE_EQ(1.0, ThumbnailGenerator::CalculateBoringScore(&bitmap));
}
@@ -227,7 +227,7 @@
// Fill the left half pixels in white.
canvas.FillRectInt(kWhite, 0, 0, kSize.width() / 2, kSize.height());
- SkBitmap bitmap = canvas.getTopPlatformDevice().accessBitmap(false);
+ SkBitmap bitmap = canvas.getTopDevice().accessBitmap(false);
ASSERT_EQ(kSize.width(), bitmap.width());
ASSERT_EQ(kSize.height(), bitmap.height());
// The thumbnail should be less boring because two colors are used.
@@ -237,7 +237,7 @@
TEST(ThumbnailGeneratorSimpleTest, GetClippedBitmap_TallerThanWide) {
// The input bitmap is vertically long.
gfx::CanvasSkia canvas(40, 90, true);
- const SkBitmap bitmap = canvas.getTopPlatformDevice().accessBitmap(false);
+ const SkBitmap bitmap = canvas.getTopDevice().accessBitmap(false);
// The desired size is square.
ThumbnailGenerator::ClipResult clip_result = ThumbnailGenerator::kNotClipped;
@@ -253,7 +253,7 @@
TEST(ThumbnailGeneratorSimpleTest, GetClippedBitmap_WiderThanTall) {
// The input bitmap is horizontally long.
gfx::CanvasSkia canvas(90, 40, true);
- const SkBitmap bitmap = canvas.getTopPlatformDevice().accessBitmap(false);
+ const SkBitmap bitmap = canvas.getTopDevice().accessBitmap(false);
// The desired size is square.
ThumbnailGenerator::ClipResult clip_result = ThumbnailGenerator::kNotClipped;
@@ -269,7 +269,7 @@
TEST(ThumbnailGeneratorSimpleTest, GetClippedBitmap_NotClipped) {
// The input bitmap is square.
gfx::CanvasSkia canvas(40, 40, true);
- const SkBitmap bitmap = canvas.getTopPlatformDevice().accessBitmap(false);
+ const SkBitmap bitmap = canvas.getTopDevice().accessBitmap(false);
// The desired size is square.
ThumbnailGenerator::ClipResult clip_result = ThumbnailGenerator::kNotClipped;
@@ -285,7 +285,7 @@
TEST(ThumbnailGeneratorSimpleTest, GetClippedBitmap_NonSquareOutput) {
// The input bitmap is square.
gfx::CanvasSkia canvas(40, 40, true);
- const SkBitmap bitmap = canvas.getTopPlatformDevice().accessBitmap(false);
+ const SkBitmap bitmap = canvas.getTopDevice().accessBitmap(false);
// The desired size is horizontally long.
ThumbnailGenerator::ClipResult clip_result = ThumbnailGenerator::kNotClipped;

Powered by Google App Engine
This is Rietveld 408576698