diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 23:12:17 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-03 23:12:17 +0000 |
commit | 755bbc4326d8c6c05900d681e232ec7b069e25c2 (patch) | |
tree | 34bcacd3235024c11e5f6831302e8081d8bd7def /chrome/browser/history/visit_database_unittest.cc | |
parent | 819c9c270122b9d37498dd3f77d779b0cb5346e2 (diff) | |
download | chromium_src-755bbc4326d8c6c05900d681e232ec7b069e25c2.zip chromium_src-755bbc4326d8c6c05900d681e232ec7b069e25c2.tar.gz chromium_src-755bbc4326d8c6c05900d681e232ec7b069e25c2.tar.bz2 |
Eliminate QueryOptions::most_recent_visit_only. All non-unittest consumers of this set it to true, so just turn it on unconditionally.
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/341087
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30880 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/history/visit_database_unittest.cc')
-rw-r--r-- | chrome/browser/history/visit_database_unittest.cc | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/chrome/browser/history/visit_database_unittest.cc b/chrome/browser/history/visit_database_unittest.cc index aedb9e9..ebc2e1b 100644 --- a/chrome/browser/history/visit_database_unittest.cc +++ b/chrome/browser/history/visit_database_unittest.cc @@ -207,33 +207,24 @@ TEST_F(VisitDatabaseTest, GetVisibleVisitsInRange) { visit_info5.visit_id = 5; EXPECT_TRUE(AddVisit(&visit_info5)); - // Query the visits for all time, we should get the first 3 in descending - // order, but not the redirect & subframe ones later. + // Query the visits for all time, we should not get the first (duplicate of + // the second) or the redirect or subframe visits. VisitVector results; - GetVisibleVisitsInRange(Time(), Time(), false, 0, &results); - ASSERT_EQ(static_cast<size_t>(3), results.size()); - EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info4) && - IsVisitInfoEqual(results[1], visit_info2) && - IsVisitInfoEqual(results[2], visit_info1)); - - // If we want only the most recent one, it should give us the same results - // minus the first (duplicate of the second) one. - GetVisibleVisitsInRange(Time(), Time(), true, 0, &results); + GetVisibleVisitsInRange(Time(), Time(), 0, &results); ASSERT_EQ(static_cast<size_t>(2), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info4) && IsVisitInfoEqual(results[1], visit_info2)); // Query a time range and make sure beginning is inclusive and ending is // exclusive. - GetVisibleVisitsInRange(visit_info2.visit_time, visit_info4.visit_time, - false, 0, &results); + GetVisibleVisitsInRange(visit_info2.visit_time, visit_info4.visit_time, 0, + &results); ASSERT_EQ(static_cast<size_t>(1), results.size()); EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info2)); // Query for a max count and make sure we get only that number. - GetVisibleVisitsInRange(Time(), Time(), false, 2, &results); - ASSERT_EQ(static_cast<size_t>(2), results.size()); - EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info4) && - IsVisitInfoEqual(results[1], visit_info2)); + GetVisibleVisitsInRange(Time(), Time(), 1, &results); + ASSERT_EQ(static_cast<size_t>(1), results.size()); + EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info4)); } } // namespace history |