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 "chrome/browser/thumbnails/thumbnail_service_impl.h" | 5 #include "chrome/browser/thumbnails/thumbnail_service_impl.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/macros.h" |
8 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
9 #include "chrome/browser/history/history_utils.h" | 12 #include "chrome/browser/history/history_utils.h" |
10 #include "chrome/browser/history/top_sites_factory.h" | 13 #include "chrome/browser/history/top_sites_factory.h" |
11 #include "chrome/test/base/testing_profile.h" | 14 #include "chrome/test/base/testing_profile.h" |
12 #include "components/history/core/browser/top_sites_impl.h" | 15 #include "components/history/core/browser/top_sites_impl.h" |
13 #include "content/public/test/test_browser_thread_bundle.h" | 16 #include "content/public/test/test_browser_thread_bundle.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
15 | 18 |
16 class ThumbnailServiceTest : public testing::Test { | 19 class ThumbnailServiceTest : public testing::Test { |
17 content::TestBrowserThreadBundle thread_bundle_; | 20 content::TestBrowserThreadBundle thread_bundle_; |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 good_score.at_top = true; | 134 good_score.at_top = true; |
132 good_score.good_clipping = true; | 135 good_score.good_clipping = true; |
133 good_score.boring_score = 0.0; | 136 good_score.boring_score = 0.0; |
134 good_score.load_completed = true; | 137 good_score.load_completed = true; |
135 profile.AddKnownURL(kGoodURL, good_score); | 138 profile.AddKnownURL(kGoodURL, good_score); |
136 | 139 |
137 // Should be false, as the existing thumbnail is good enough (i.e. don't | 140 // Should be false, as the existing thumbnail is good enough (i.e. don't |
138 // need to replace the existing thumbnail which is new and good). | 141 // need to replace the existing thumbnail which is new and good). |
139 EXPECT_FALSE(thumbnail_service->ShouldAcquirePageThumbnail(kGoodURL)); | 142 EXPECT_FALSE(thumbnail_service->ShouldAcquirePageThumbnail(kGoodURL)); |
140 } | 143 } |
OLD | NEW |