OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/bind.h" | 5 #include "base/bind.h" |
6 #include "base/memory/weak_ptr.h" | 6 #include "base/memory/weak_ptr.h" |
7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "base/task/cancelable_task_tracker.h" | 9 #include "base/task/cancelable_task_tracker.h" |
10 #include "chrome/browser/chrome_notification_types.h" | 10 #include "chrome/browser/chrome_notification_types.h" |
11 #include "chrome/browser/history/history_db_task.h" | 11 #include "chrome/browser/history/history_db_task.h" |
12 #include "chrome/browser/history/history_notifications.h" | 12 #include "chrome/browser/history/history_notifications.h" |
13 #include "chrome/browser/history/history_service_factory.h" | 13 #include "chrome/browser/history/history_service_factory.h" |
14 #include "chrome/browser/history/history_unittest_base.h" | 14 #include "chrome/browser/history/history_unittest_base.h" |
15 #include "chrome/browser/history/top_sites.h" | 15 #include "chrome/browser/history/top_sites.h" |
16 #include "chrome/browser/history/top_sites_cache.h" | 16 #include "chrome/browser/history/top_sites_cache.h" |
17 #include "chrome/browser/history/top_sites_impl.h" | 17 #include "chrome/browser/history/top_sites_impl.h" |
18 #include "chrome/common/chrome_constants.h" | 18 #include "chrome/common/chrome_constants.h" |
19 #include "chrome/common/chrome_paths.h" | 19 #include "chrome/common/chrome_paths.h" |
20 #include "chrome/test/base/testing_profile.h" | 20 #include "chrome/test/base/testing_profile.h" |
21 #include "components/history/core/browser/history_types.h" | 21 #include "components/history/core/browser/history_types.h" |
| 22 #include "components/history/core/browser/top_sites_observer.h" |
22 #include "content/public/browser/notification_service.h" | 23 #include "content/public/browser/notification_service.h" |
23 #include "content/public/test/test_browser_thread.h" | 24 #include "content/public/test/test_browser_thread.h" |
24 #include "testing/gtest/include/gtest/gtest.h" | 25 #include "testing/gtest/include/gtest/gtest.h" |
25 #include "third_party/skia/include/core/SkBitmap.h" | 26 #include "third_party/skia/include/core/SkBitmap.h" |
26 #include "ui/gfx/codec/jpeg_codec.h" | 27 #include "ui/gfx/codec/jpeg_codec.h" |
27 #include "url/gurl.h" | 28 #include "url/gurl.h" |
28 | 29 |
29 using content::BrowserThread; | 30 using content::BrowserThread; |
30 | 31 |
31 class TestTopSitesObserver : public history::TopSitesObserver { | 32 class TestTopSitesObserver : public history::TopSitesObserver { |
(...skipping 1650 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1682 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize()); | 1683 ASSERT_EQ(orig_thumbnail.getSize(), thumbnail.getSize()); |
1683 orig_thumbnail.lockPixels(); | 1684 orig_thumbnail.lockPixels(); |
1684 thumbnail.lockPixels(); | 1685 thumbnail.lockPixels(); |
1685 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(), | 1686 EXPECT_EQ(0, memcmp(orig_thumbnail.getPixels(), thumbnail.getPixels(), |
1686 orig_thumbnail.getSize())); | 1687 orig_thumbnail.getSize())); |
1687 thumbnail.unlockPixels(); | 1688 thumbnail.unlockPixels(); |
1688 orig_thumbnail.unlockPixels(); | 1689 orig_thumbnail.unlockPixels(); |
1689 } | 1690 } |
1690 | 1691 |
1691 } // namespace history | 1692 } // namespace history |
OLD | NEW |