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 <set> | 5 #include <set> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/files/scoped_temp_dir.h" | 9 #include "base/files/scoped_temp_dir.h" |
10 #include "base/path_service.h" | 10 #include "base/path_service.h" |
11 #include "base/strings/string_util.h" | 11 #include "base/strings/string_util.h" |
12 #include "base/time/time.h" | 12 #include "base/time/time.h" |
13 #include "chrome/browser/history/url_database.h" | |
14 #include "chrome/browser/history/visit_database.h" | 13 #include "chrome/browser/history/visit_database.h" |
| 14 #include "components/history/core/browser/url_database.h" |
15 #include "sql/connection.h" | 15 #include "sql/connection.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 #include "testing/platform_test.h" | 17 #include "testing/platform_test.h" |
18 | 18 |
19 using base::Time; | 19 using base::Time; |
20 using base::TimeDelta; | 20 using base::TimeDelta; |
21 | 21 |
22 namespace history { | 22 namespace history { |
23 | 23 |
24 namespace { | 24 namespace { |
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
413 // Now try without de-duping, expect to see all visible visits to url id 1. | 413 // Now try without de-duping, expect to see all visible visits to url id 1. |
414 options.duplicate_policy = QueryOptions::KEEP_ALL_DUPLICATES; | 414 options.duplicate_policy = QueryOptions::KEEP_ALL_DUPLICATES; |
415 GetVisibleVisitsForURL(url_id, options, &results); | 415 GetVisibleVisitsForURL(url_id, options, &results); |
416 ASSERT_EQ(static_cast<size_t>(3), results.size()); | 416 ASSERT_EQ(static_cast<size_t>(3), results.size()); |
417 EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); | 417 EXPECT_TRUE(IsVisitInfoEqual(results[0], test_visit_rows[5])); |
418 EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[1])); | 418 EXPECT_TRUE(IsVisitInfoEqual(results[1], test_visit_rows[1])); |
419 EXPECT_TRUE(IsVisitInfoEqual(results[2], test_visit_rows[0])); | 419 EXPECT_TRUE(IsVisitInfoEqual(results[2], test_visit_rows[0])); |
420 } | 420 } |
421 | 421 |
422 } // namespace history | 422 } // namespace history |
OLD | NEW |