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

Side by Side Diff: chrome/browser/thumbnails/content_based_thumbnailing_algorithm_unittest.cc

Issue 2640983002: Rename paint data structures (Closed)
Patch Set: three Rs: rebase, readme, review Created 3 years, 10 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
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 "base/macros.h" 5 #include "base/macros.h"
6 #include "base/message_loop/message_loop.h" 6 #include "base/message_loop/message_loop.h"
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h" 8 #include "chrome/browser/thumbnails/content_based_thumbnailing_algorithm.h"
9 #include "chrome/browser/thumbnails/simple_thumbnail_crop.h" 9 #include "chrome/browser/thumbnails/simple_thumbnail_crop.h"
10 #include "content/public/browser/browser_thread.h" 10 #include "content/public/browser/browser_thread.h"
11 #include "content/public/test/test_browser_thread.h" 11 #include "content/public/test/test_browser_thread.h"
12 #include "skia/ext/platform_canvas.h"
12 #include "testing/gtest/include/gtest/gtest.h" 13 #include "testing/gtest/include/gtest/gtest.h"
13 #include "third_party/skia/include/core/SkBitmap.h" 14 #include "third_party/skia/include/core/SkBitmap.h"
14 #include "ui/gfx/canvas.h" 15 #include "ui/gfx/canvas.h"
15 #include "ui/gfx/scrollbar_size.h" 16 #include "ui/gfx/scrollbar_size.h"
16 17
17 namespace thumbnails { 18 namespace thumbnails {
18 19
19 typedef testing::Test ContentBasedThumbnailingAlgorithmTest; 20 typedef testing::Test ContentBasedThumbnailingAlgorithmTest;
20 21
21 class ConsumerCallbackCatcher { 22 class ConsumerCallbackCatcher {
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 base::Unretained(&catcher))); 160 base::Unretained(&catcher)));
160 base::RunLoop().RunUntilIdle(); 161 base::RunLoop().RunUntilIdle();
161 ASSERT_TRUE(catcher.called_back()); 162 ASSERT_TRUE(catcher.called_back());
162 EXPECT_TRUE(catcher.score().good_clipping); 163 EXPECT_TRUE(catcher.score().good_clipping);
163 EXPECT_FALSE(catcher.captured_bitmap().empty()); 164 EXPECT_FALSE(catcher.captured_bitmap().empty());
164 EXPECT_LT(catcher.captured_bitmap().width(), source.width()); 165 EXPECT_LT(catcher.captured_bitmap().width(), source.width());
165 EXPECT_LT(catcher.captured_bitmap().height(), source.height()); 166 EXPECT_LT(catcher.captured_bitmap().height(), source.height());
166 } 167 }
167 168
168 } // namespace thumbnails 169 } // namespace thumbnails
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698