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

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

Issue 23477033: Implementing URL prefix match for history thumbnail cache. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Replacing ASSERT_TRUE() << ... to NOTREACHED() << ... Created 7 years, 3 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/extensions/extension_service.cc ('k') | chrome/browser/history/top_sites.h » ('j') | 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) 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 <string> 6 #include <string>
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 } 304 }
305 305
306 bool ExpireHistoryTest::HasThumbnail(URLID url_id) { 306 bool ExpireHistoryTest::HasThumbnail(URLID url_id) {
307 // TODO(sky): fix this. This test isn't really valid for TopSites. For 307 // TODO(sky): fix this. This test isn't really valid for TopSites. For
308 // TopSites we should be checking URL always, not the id. 308 // TopSites we should be checking URL always, not the id.
309 URLRow info; 309 URLRow info;
310 if (!main_db_->GetURLRow(url_id, &info)) 310 if (!main_db_->GetURLRow(url_id, &info))
311 return false; 311 return false;
312 GURL url = info.url(); 312 GURL url = info.url();
313 scoped_refptr<base::RefCountedMemory> data; 313 scoped_refptr<base::RefCountedMemory> data;
314 return top_sites_->GetPageThumbnail(url, &data); 314 return top_sites_->GetPageThumbnail(url, false, &data);
315 } 315 }
316 316
317 void ExpireHistoryTest::EnsureURLInfoGone(const URLRow& row) { 317 void ExpireHistoryTest::EnsureURLInfoGone(const URLRow& row) {
318 // Verify the URL no longer exists. 318 // Verify the URL no longer exists.
319 URLRow temp_row; 319 URLRow temp_row;
320 EXPECT_FALSE(main_db_->GetURLRow(row.id(), &temp_row)); 320 EXPECT_FALSE(main_db_->GetURLRow(row.id(), &temp_row));
321 321
322 // There should be no visits. 322 // There should be no visits.
323 VisitVector visits; 323 VisitVector visits;
324 main_db_->GetVisitsForURL(row.id(), &visits); 324 main_db_->GetVisitsForURL(row.id(), &visits);
(...skipping 571 matching lines...) Expand 10 before | Expand all | Expand 10 after
896 main_db_->GetVisitsForURL(url_id, &archived_visits); 896 main_db_->GetVisitsForURL(url_id, &archived_visits);
897 EXPECT_EQ(0U, archived_visits.size()); 897 EXPECT_EQ(0U, archived_visits.size());
898 } 898 }
899 899
900 // TODO(brettw) add some visits with no URL to make sure everything is updated 900 // TODO(brettw) add some visits with no URL to make sure everything is updated
901 // properly. Have the visits also refer to nonexistent FTS rows. 901 // properly. Have the visits also refer to nonexistent FTS rows.
902 // 902 //
903 // Maybe also refer to invalid favicons. 903 // Maybe also refer to invalid favicons.
904 904
905 } // namespace history 905 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service.cc ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698