OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 <windows.h> | 5 #include <windows.h> |
6 | 6 |
7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
8 #include "base/file_util.h" | 8 #include "base/file_util.h" |
9 #include "base/path_service.h" | 9 #include "base/path_service.h" |
10 #include "chrome/browser/history/thumbnail_database.h" | 10 #include "chrome/browser/history/thumbnail_database.h" |
11 #include "chrome/common/chrome_paths.h" | 11 #include "chrome/common/chrome_paths.h" |
12 #include "chrome/common/jpeg_codec.h" | 12 #include "chrome/common/jpeg_codec.h" |
13 #include "chrome/common/thumbnail_score.h" | 13 #include "chrome/common/thumbnail_score.h" |
14 #include "chrome/tools/profiles/thumbnail-inl.h" | 14 #include "chrome/tools/profiles/thumbnail-inl.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
16 #include "SkBitmap.h" | 16 #include "SkBitmap.h" |
17 | 17 |
| 18 using base::Time; |
| 19 using base::TimeDelta; |
| 20 |
18 namespace history { | 21 namespace history { |
19 | 22 |
20 namespace { | 23 namespace { |
21 | 24 |
22 class ThumbnailDatabaseTest : public testing::Test { | 25 class ThumbnailDatabaseTest : public testing::Test { |
23 public: | 26 public: |
24 ThumbnailDatabaseTest() { | 27 ThumbnailDatabaseTest() { |
25 } | 28 } |
26 ~ThumbnailDatabaseTest() { | 29 ~ThumbnailDatabaseTest() { |
27 } | 30 } |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
311 ThumbnailScore totally_boring_in_the_future( | 314 ThumbnailScore totally_boring_in_the_future( |
312 kTotallyBoring, true, true, kNow + TimeDelta::FromDays(365)); | 315 kTotallyBoring, true, true, kNow + TimeDelta::FromDays(365)); |
313 db.SetPageThumbnail(kPage1, *google_bitmap_, totally_boring_in_the_future); | 316 db.SetPageThumbnail(kPage1, *google_bitmap_, totally_boring_in_the_future); |
314 ASSERT_TRUE(db.GetPageThumbnail(kPage1, &jpeg_data)); | 317 ASSERT_TRUE(db.GetPageThumbnail(kPage1, &jpeg_data)); |
315 ASSERT_TRUE(db.ThumbnailScoreForId(kPage1, &score_out)); | 318 ASSERT_TRUE(db.ThumbnailScoreForId(kPage1, &score_out)); |
316 ASSERT_TRUE(base_boring.Equals(score_out)); | 319 ASSERT_TRUE(base_boring.Equals(score_out)); |
317 } | 320 } |
318 | 321 |
319 } // namespace history | 322 } // namespace history |
320 | 323 |
OLD | NEW |