Chromium Code Reviews

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

Issue 7995: Move Time, TimeDelta and TimeTicks into namespace base. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | | Annotate | Revision Log
OLDNEW
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/path_service.h" 6 #include "base/path_service.h"
7 #include "base/string_util.h" 7 #include "base/string_util.h"
8 #include "chrome/browser/history/url_database.h" 8 #include "chrome/browser/history/url_database.h"
9 #include "chrome/browser/history/visit_database.h" 9 #include "chrome/browser/history/visit_database.h"
10 #include "chrome/common/sqlite_compiled_statement.h" 10 #include "chrome/common/sqlite_compiled_statement.h"
11 #include "chrome/common/sqlite_utils.h" 11 #include "chrome/common/sqlite_utils.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using base::Time;
15 using base::TimeDelta;
16
14 namespace history { 17 namespace history {
15 18
16 namespace { 19 namespace {
17 20
18 bool IsVisitInfoEqual(const VisitRow& a, 21 bool IsVisitInfoEqual(const VisitRow& a,
19 const VisitRow& b) { 22 const VisitRow& b) {
20 return a.visit_id == b.visit_id && 23 return a.visit_id == b.visit_id &&
21 a.url_id == b.url_id && 24 a.url_id == b.url_id &&
22 a.visit_time == b.visit_time && 25 a.visit_time == b.visit_time &&
23 a.referring_visit == b.referring_visit && 26 a.referring_visit == b.referring_visit &&
(...skipping 207 matching lines...)
231 EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info2)); 234 EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info2));
232 235
233 // Query for a max count and make sure we get only that number. 236 // Query for a max count and make sure we get only that number.
234 GetVisibleVisitsInRange(Time(), Time(), false, 2, &results); 237 GetVisibleVisitsInRange(Time(), Time(), false, 2, &results);
235 ASSERT_EQ(2, results.size()); 238 ASSERT_EQ(2, results.size());
236 EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info4) && 239 EXPECT_TRUE(IsVisitInfoEqual(results[0], visit_info4) &&
237 IsVisitInfoEqual(results[1], visit_info2)); 240 IsVisitInfoEqual(results[1], visit_info2));
238 } 241 }
239 242
240 } // namespace history 243 } // namespace history
OLDNEW

Powered by Google App Engine