OLD | NEW |
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 <stddef.h> | 5 #include <stddef.h> |
6 | 6 |
7 #include <set> | 7 #include <set> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 30 matching lines...) Expand all Loading... |
41 public VisitDatabase { | 41 public VisitDatabase { |
42 public: | 42 public: |
43 VisitDatabaseTest() { | 43 VisitDatabaseTest() { |
44 } | 44 } |
45 | 45 |
46 private: | 46 private: |
47 // Test setup. | 47 // Test setup. |
48 void SetUp() override { | 48 void SetUp() override { |
49 PlatformTest::SetUp(); | 49 PlatformTest::SetUp(); |
50 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 50 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
51 base::FilePath db_file = temp_dir_.path().AppendASCII("VisitTest.db"); | 51 base::FilePath db_file = temp_dir_.GetPath().AppendASCII("VisitTest.db"); |
52 | 52 |
53 EXPECT_TRUE(db_.Open(db_file)); | 53 EXPECT_TRUE(db_.Open(db_file)); |
54 | 54 |
55 // Initialize the tables for this test. | 55 // Initialize the tables for this test. |
56 CreateURLTable(false); | 56 CreateURLTable(false); |
57 CreateMainURLIndex(); | 57 CreateMainURLIndex(); |
58 InitVisitTable(); | 58 InitVisitTable(); |
59 } | 59 } |
60 void TearDown() override { | 60 void TearDown() override { |
61 db_.Close(); | 61 db_.Close(); |
(...skipping 526 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
588 AddVisit(&forward_2, SOURCE_BROWSED); | 588 AddVisit(&forward_2, SOURCE_BROWSED); |
589 | 589 |
590 EXPECT_TRUE(GetHistoryCount(shift_forward, | 590 EXPECT_TRUE(GetHistoryCount(shift_forward, |
591 shift_forward + TimeDelta::FromHours(24), | 591 shift_forward + TimeDelta::FromHours(24), |
592 &result)); | 592 &result)); |
593 EXPECT_EQ(2, result); | 593 EXPECT_EQ(2, result); |
594 } | 594 } |
595 } | 595 } |
596 | 596 |
597 } // namespace history | 597 } // namespace history |
OLD | NEW |