Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(71)

Side by Side Diff: chrome/browser/history/thumbnail_database_unittest.cc

Issue 10821035: wip Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 <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"
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 145
146 TEST_F(ThumbnailDatabaseTest, GetFaviconIDForURL) { 146 TEST_F(ThumbnailDatabaseTest, GetFaviconIDForURL) {
147 ThumbnailDatabase db; 147 ThumbnailDatabase db;
148 ASSERT_EQ(sql::INIT_OK, db.Init(file_name_, NULL, NULL)); 148 ASSERT_EQ(sql::INIT_OK, db.Init(file_name_, NULL, NULL));
149 db.BeginTransaction(); 149 db.BeginTransaction();
150 150
151 std::vector<unsigned char> data(blob1, blob1 + sizeof(blob1)); 151 std::vector<unsigned char> data(blob1, blob1 + sizeof(blob1));
152 scoped_refptr<base::RefCountedBytes> favicon(new base::RefCountedBytes(data)); 152 scoped_refptr<base::RefCountedBytes> favicon(new base::RefCountedBytes(data));
153 153
154 GURL url("http://google.com"); 154 GURL url("http://google.com");
155 base::Time time = base::Time::Now(); 155 //base::Time time = base::Time::Now();
156 156
157 FaviconID id1 = db.AddFavicon(url, kFaviconRegularSize, FAVICON); 157 FaviconID id1 = db.AddFavicon(url, kFaviconRegularSize, FAVICON);
158 EXPECT_NE(0, id1); 158 EXPECT_NE(0, id1);
159 159
160 FaviconID id2 = db.AddFavicon(url, kFaviconRegularSize, 160 FaviconID id2 = db.AddFavicon(url, kFaviconRegularSize,
161 TOUCH_PRECOMPOSED_ICON); 161 TOUCH_PRECOMPOSED_ICON);
162 EXPECT_NE(0, id2); 162 EXPECT_NE(0, id2);
163 163
164 FaviconID id3 = db.AddFavicon(url, kFaviconLargeSize, 164 FaviconID id3 = db.AddFavicon(url, kFaviconLargeSize,
165 TOUCH_PRECOMPOSED_ICON); 165 TOUCH_PRECOMPOSED_ICON);
(...skipping 569 matching lines...) Expand 10 before | Expand all | Expand 10 after
735 ASSERT_TRUE(enumerator2.GetNextIconMapping(&icon_mapping)); 735 ASSERT_TRUE(enumerator2.GetNextIconMapping(&icon_mapping));
736 EXPECT_EQ(touch_mapping_id1, icon_mapping.mapping_id); 736 EXPECT_EQ(touch_mapping_id1, icon_mapping.mapping_id);
737 EXPECT_EQ(url, icon_mapping.page_url); 737 EXPECT_EQ(url, icon_mapping.page_url);
738 EXPECT_EQ(touch_icon_id1, icon_mapping.icon_id); 738 EXPECT_EQ(touch_icon_id1, icon_mapping.icon_id);
739 EXPECT_EQ(TOUCH_ICON, icon_mapping.icon_type); 739 EXPECT_EQ(TOUCH_ICON, icon_mapping.icon_type);
740 740
741 EXPECT_FALSE(enumerator2.GetNextIconMapping(&icon_mapping)); 741 EXPECT_FALSE(enumerator2.GetNextIconMapping(&icon_mapping));
742 } 742 }
743 743
744 } // namespace history 744 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_types.cc ('k') | chrome/browser/sync/glue/session_model_associator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698