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 "base/file_util.h" | 5 #include "base/file_util.h" |
| 6 #include "base/gfx/jpeg_codec.h" |
6 #include "base/path_service.h" | 7 #include "base/path_service.h" |
7 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
8 #include "chrome/browser/bookmarks/bookmark_model.h" | 9 #include "chrome/browser/bookmarks/bookmark_model.h" |
9 #include "chrome/browser/history/history_backend.h" | 10 #include "chrome/browser/history/history_backend.h" |
10 #include "chrome/browser/history/in_memory_history_backend.h" | 11 #include "chrome/browser/history/in_memory_history_backend.h" |
11 #include "chrome/browser/history/in_memory_database.h" | 12 #include "chrome/browser/history/in_memory_database.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 "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
18 using base::Time; | 18 using base::Time; |
19 | 19 |
20 // This file only tests functionality where it is most convenient to call the | 20 // This file only tests functionality where it is most convenient to call the |
21 // backend directly. Most of the history backend functions are tested by the | 21 // backend directly. Most of the history backend functions are tested by the |
22 // history unit test. Because of the elaborate callbacks involved, this is no | 22 // history unit test. Because of the elaborate callbacks involved, this is no |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 // Now try to get the thumbnail for the base url. It shouldn't be | 386 // Now try to get the thumbnail for the base url. It shouldn't be |
387 // distracted by the second chain and should return the thumbnail | 387 // distracted by the second chain and should return the thumbnail |
388 // attached to thumbnail_url_. | 388 // attached to thumbnail_url_. |
389 scoped_refptr<RefCountedBytes> data; | 389 scoped_refptr<RefCountedBytes> data; |
390 backend_->GetPageThumbnailDirectly(GURL(base_url), &data); | 390 backend_->GetPageThumbnailDirectly(GURL(base_url), &data); |
391 | 391 |
392 EXPECT_TRUE(data.get()); | 392 EXPECT_TRUE(data.get()); |
393 } | 393 } |
394 | 394 |
395 } // namespace history | 395 } // namespace history |
OLD | NEW |