OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 <algorithm> | 5 #include <algorithm> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/file_path.h" | 10 #include "base/file_path.h" |
11 #include "base/file_util.h" | 11 #include "base/file_util.h" |
12 #include "base/path_service.h" | 12 #include "base/path_service.h" |
13 #include "base/ref_counted_memory.h" | 13 #include "base/ref_counted_memory.h" |
14 #include "base/scoped_temp_dir.h" | 14 #include "base/scoped_temp_dir.h" |
15 #include "chrome/browser/history/thumbnail_database.h" | 15 #include "chrome/browser/history/thumbnail_database.h" |
16 #include "chrome/common/chrome_paths.h" | 16 #include "chrome/common/chrome_paths.h" |
17 #include "chrome/common/thumbnail_score.h" | 17 #include "chrome/common/thumbnail_score.h" |
18 #include "chrome/tools/profiles/thumbnail-inl.h" | 18 #include "chrome/tools/profiles/thumbnail-inl.h" |
19 #include "gfx/codec/jpeg_codec.h" | |
20 #include "googleurl/src/gurl.h" | 19 #include "googleurl/src/gurl.h" |
21 #include "testing/gtest/include/gtest/gtest.h" | 20 #include "testing/gtest/include/gtest/gtest.h" |
22 #include "third_party/skia/include/core/SkBitmap.h" | 21 #include "third_party/skia/include/core/SkBitmap.h" |
| 22 #include "ui/gfx/codec/jpeg_codec.h" |
23 | 23 |
24 using base::Time; | 24 using base::Time; |
25 using base::TimeDelta; | 25 using base::TimeDelta; |
26 | 26 |
27 namespace history { | 27 namespace history { |
28 | 28 |
29 namespace { | 29 namespace { |
30 | 30 |
31 // data we'll put into the thumbnail database | 31 // data we'll put into the thumbnail database |
32 static const unsigned char blob1[] = | 32 static const unsigned char blob1[] = |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 EXPECT_TRUE(db.GetFavIcon(id, &time_out, &favicon_out, &url_out)); | 90 EXPECT_TRUE(db.GetFavIcon(id, &time_out, &favicon_out, &url_out)); |
91 EXPECT_EQ(url, url_out); | 91 EXPECT_EQ(url, url_out); |
92 EXPECT_EQ(time.ToTimeT(), time_out.ToTimeT()); | 92 EXPECT_EQ(time.ToTimeT(), time_out.ToTimeT()); |
93 ASSERT_EQ(data.size(), favicon_out.size()); | 93 ASSERT_EQ(data.size(), favicon_out.size()); |
94 EXPECT_TRUE(std::equal(data.begin(), | 94 EXPECT_TRUE(std::equal(data.begin(), |
95 data.end(), | 95 data.end(), |
96 favicon_out.begin())); | 96 favicon_out.begin())); |
97 } | 97 } |
98 | 98 |
99 } // namespace history | 99 } // namespace history |
OLD | NEW |