diff options
author | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-09 03:25:30 +0000 |
---|---|---|
committer | davemoore@chromium.org <davemoore@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-10-09 03:25:30 +0000 |
commit | 7281e4cf77a6ebcd7c79db4f87629c7565ff4289 (patch) | |
tree | a0c5b4c4b7b64453ffe6f5cc606e0e9384808e74 /gfx/skbitmap_operations_unittest.cc | |
parent | b83af49ec37d7354cd6134d0cac0ea85101f9c4f (diff) | |
download | chromium_src-7281e4cf77a6ebcd7c79db4f87629c7565ff4289.zip chromium_src-7281e4cf77a6ebcd7c79db4f87629c7565ff4289.tar.gz chromium_src-7281e4cf77a6ebcd7c79db4f87629c7565ff4289.tar.bz2 |
Move implementation of linux scrollbars from webkit using new
WebThemeEngine api. Also implement chromeos specific version.
BUG=chromium-os:6857
TEST=Verify that both linux and chromeos scrollbars look right.
Review URL: http://codereview.chromium.org/3618014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62068 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gfx/skbitmap_operations_unittest.cc')
-rw-r--r-- | gfx/skbitmap_operations_unittest.cc | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/gfx/skbitmap_operations_unittest.cc b/gfx/skbitmap_operations_unittest.cc index 83b732a0..bcad287 100644 --- a/gfx/skbitmap_operations_unittest.cc +++ b/gfx/skbitmap_operations_unittest.cc @@ -492,3 +492,26 @@ TEST(SkBitmapOperationsTest, UnPreMultiply) { EXPECT_EQ(0xFF00CC88, *result.getAddr32(0, 1)); EXPECT_EQ(0x00000000u, *result.getAddr32(1, 1)); // "Division by zero". } + +TEST(SkBitmapOperationsTest, CreateTransposedBtmap) { + SkBitmap input; + input.setConfig(SkBitmap::kARGB_8888_Config, 2, 3); + input.allocPixels(); + + for (int x = 0; x < input.width(); ++x) { + for (int y = 0; y < input.height(); ++y) { + *input.getAddr32(x, y) = x * input.width() + y; + } + } + + SkBitmap result = SkBitmapOperations::CreateTransposedBtmap(input); + EXPECT_EQ(3, result.width()); + EXPECT_EQ(2, result.height()); + + SkAutoLockPixels lock(result); + for (int x = 0; x < input.width(); ++x) { + for (int y = 0; y < input.height(); ++y) { + EXPECT_EQ(*input.getAddr32(x, y), *result.getAddr32(y, x)); + } + } +} |