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

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

Issue 6698031: fav icon -> favicon. Pass 7: FavIconID -> FaviconID (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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
« no previous file with comments | « chrome/browser/history/thumbnail_database_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "app/sql/connection.h" 5 #include "app/sql/connection.h"
6 #include "base/file_path.h" 6 #include "base/file_path.h"
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/path_service.h" 8 #include "base/path_service.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/utf_string_conversions.h" 10 #include "base/utf_string_conversions.h"
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 url_info1.set_title(UTF8ToUTF16("Google")); 228 url_info1.set_title(UTF8ToUTF16("Google"));
229 url_info1.set_visit_count(4); 229 url_info1.set_visit_count(4);
230 url_info1.set_typed_count(2); 230 url_info1.set_typed_count(2);
231 url_info1.set_last_visit(Time::Now() - TimeDelta::FromDays(1)); 231 url_info1.set_last_visit(Time::Now() - TimeDelta::FromDays(1));
232 url_info1.set_hidden(false); 232 url_info1.set_hidden(false);
233 233
234 // Insert a row with favicon 234 // Insert a row with favicon
235 URLID url_id1 = AddURL(url_info1); 235 URLID url_id1 = AddURL(url_info1);
236 ASSERT_TRUE(url_id1 != 0); 236 ASSERT_TRUE(url_id1 != 0);
237 237
238 FavIconID icon_id = 1; 238 FaviconID icon_id = 1;
239 sql::Statement statement(GetDB().GetCachedStatement( 239 sql::Statement statement(GetDB().GetCachedStatement(
240 SQL_FROM_HERE, 240 SQL_FROM_HERE,
241 "UPDATE urls SET favicon_id =? WHERE id=?")); 241 "UPDATE urls SET favicon_id =? WHERE id=?"));
242 242
243 ASSERT_TRUE(statement); 243 ASSERT_TRUE(statement);
244 244
245 statement.BindInt64(0, icon_id); 245 statement.BindInt64(0, icon_id);
246 statement.BindInt64(1, url_id1); 246 statement.BindInt64(1, url_id1);
247 ASSERT_TRUE(statement.Run()); 247 ASSERT_TRUE(statement.Run());
248 248
(...skipping 13 matching lines...) Expand all
262 IconMappingEnumerator e; 262 IconMappingEnumerator e;
263 InitIconMappingEnumeratorForEverything(&e); 263 InitIconMappingEnumeratorForEverything(&e);
264 IconMapping icon_mapping; 264 IconMapping icon_mapping;
265 ASSERT_TRUE(e.GetNextIconMapping(&icon_mapping)); 265 ASSERT_TRUE(e.GetNextIconMapping(&icon_mapping));
266 ASSERT_EQ(url1, icon_mapping.page_url); 266 ASSERT_EQ(url1, icon_mapping.page_url);
267 ASSERT_EQ(icon_id, icon_mapping.icon_id); 267 ASSERT_EQ(icon_id, icon_mapping.icon_id);
268 ASSERT_FALSE(e.GetNextIconMapping(&icon_mapping)); 268 ASSERT_FALSE(e.GetNextIconMapping(&icon_mapping));
269 } 269 }
270 270
271 } // namespace history 271 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/thumbnail_database_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698