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

Side by Side Diff: ash/desktop_background/wallpaper_resizer_unittest.cc

Issue 224113005: Eliminate ash::internal namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/desktop_background/desktop_background_widget_controller.cc ('k') | ash/dip_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/desktop_background/wallpaper_resizer.h" 5 #include "ash/desktop_background/wallpaper_resizer.h"
6 6
7 #include "ash/desktop_background/wallpaper_resizer_observer.h" 7 #include "ash/desktop_background/wallpaper_resizer_observer.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/public/test/test_browser_thread.h" 9 #include "content/public/test/test_browser_thread.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 EXPECT_EQ(image.width(), kTargetWidth); 48 EXPECT_EQ(image.width(), kTargetWidth);
49 EXPECT_EQ(image.height(), kTargetHeight); 49 EXPECT_EQ(image.height(), kTargetHeight);
50 const SkBitmap* image_bitmap = image.bitmap(); 50 const SkBitmap* image_bitmap = image.bitmap();
51 SkAutoLockPixels image_lock(*image_bitmap); 51 SkAutoLockPixels image_lock(*image_bitmap);
52 return *image_bitmap->getAddr32(0, 0) == expect; 52 return *image_bitmap->getAddr32(0, 0) == expect;
53 } 53 }
54 54
55 } // namespace 55 } // namespace
56 56
57 namespace ash { 57 namespace ash {
58 namespace internal {
59 58
60 class WallpaperResizerTest : public testing::Test, 59 class WallpaperResizerTest : public testing::Test,
61 public WallpaperResizerObserver { 60 public WallpaperResizerObserver {
62 public: 61 public:
63 WallpaperResizerTest() 62 WallpaperResizerTest()
64 : ui_thread_(content::BrowserThread::UI, &message_loop_) { 63 : ui_thread_(content::BrowserThread::UI, &message_loop_) {
65 } 64 }
66 virtual ~WallpaperResizerTest() {} 65 virtual ~WallpaperResizerTest() {}
67 66
68 gfx::ImageSkia Resize(const gfx::ImageSkia& image, 67 gfx::ImageSkia Resize(const gfx::ImageSkia& image,
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // both pre- and post-resize that matches the ID returned by GetImageId(). 148 // both pre- and post-resize that matches the ID returned by GetImageId().
150 WallpaperResizer resizer(image, gfx::Size(10, 20), WALLPAPER_LAYOUT_STRETCH); 149 WallpaperResizer resizer(image, gfx::Size(10, 20), WALLPAPER_LAYOUT_STRETCH);
151 EXPECT_EQ(WallpaperResizer::GetImageId(image), resizer.original_image_id()); 150 EXPECT_EQ(WallpaperResizer::GetImageId(image), resizer.original_image_id());
152 resizer.AddObserver(this); 151 resizer.AddObserver(this);
153 resizer.StartResize(); 152 resizer.StartResize();
154 WaitForResize(); 153 WaitForResize();
155 resizer.RemoveObserver(this); 154 resizer.RemoveObserver(this);
156 EXPECT_EQ(WallpaperResizer::GetImageId(image), resizer.original_image_id()); 155 EXPECT_EQ(WallpaperResizer::GetImageId(image), resizer.original_image_id());
157 } 156 }
158 157
159 } // namespace internal
160 } // namespace ash 158 } // namespace ash
OLDNEW
« no previous file with comments | « ash/desktop_background/desktop_background_widget_controller.cc ('k') | ash/dip_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698