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