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 // History unit tests come in two flavors: | 5 // History unit tests come in two flavors: |
6 // | 6 // |
7 // 1. The more complicated style is that the unit test creates a full history | 7 // 1. The more complicated style is that the unit test creates a full history |
8 // service. This spawns a background thread for the history backend, and | 8 // service. This spawns a background thread for the history backend, and |
9 // all communication is asynchronous. This is useful for testing more | 9 // all communication is asynchronous. This is useful for testing more |
10 // complicated things or end-to-end behavior. | 10 // complicated things or end-to-end behavior. |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 #include "base/threading/platform_thread.h" | 43 #include "base/threading/platform_thread.h" |
44 #include "base/time/time.h" | 44 #include "base/time/time.h" |
45 #include "chrome/browser/history/download_row.h" | 45 #include "chrome/browser/history/download_row.h" |
46 #include "chrome/browser/history/history_backend.h" | 46 #include "chrome/browser/history/history_backend.h" |
47 #include "chrome/browser/history/history_database.h" | 47 #include "chrome/browser/history/history_database.h" |
48 #include "chrome/browser/history/history_db_task.h" | 48 #include "chrome/browser/history/history_db_task.h" |
49 #include "chrome/browser/history/history_notifications.h" | 49 #include "chrome/browser/history/history_notifications.h" |
50 #include "chrome/browser/history/history_service.h" | 50 #include "chrome/browser/history/history_service.h" |
51 #include "chrome/browser/history/history_unittest_base.h" | 51 #include "chrome/browser/history/history_unittest_base.h" |
52 #include "chrome/browser/history/in_memory_history_backend.h" | 52 #include "chrome/browser/history/in_memory_history_backend.h" |
53 #include "chrome/browser/history/page_usage_data.h" | |
54 #include "chrome/common/chrome_constants.h" | 53 #include "chrome/common/chrome_constants.h" |
55 #include "chrome/common/chrome_paths.h" | 54 #include "chrome/common/chrome_paths.h" |
56 #include "chrome/tools/profiles/thumbnail-inl.h" | 55 #include "chrome/tools/profiles/thumbnail-inl.h" |
57 #include "components/history/core/browser/in_memory_database.h" | 56 #include "components/history/core/browser/in_memory_database.h" |
| 57 #include "components/history/core/browser/page_usage_data.h" |
58 #include "components/history/core/common/thumbnail_score.h" | 58 #include "components/history/core/common/thumbnail_score.h" |
59 #include "content/public/browser/download_item.h" | 59 #include "content/public/browser/download_item.h" |
60 #include "content/public/browser/notification_details.h" | 60 #include "content/public/browser/notification_details.h" |
61 #include "content/public/browser/notification_source.h" | 61 #include "content/public/browser/notification_source.h" |
62 #include "sql/connection.h" | 62 #include "sql/connection.h" |
63 #include "sql/statement.h" | 63 #include "sql/statement.h" |
64 #include "sync/api/attachments/attachment_id.h" | 64 #include "sync/api/attachments/attachment_id.h" |
65 #include "sync/api/attachments/attachment_service_proxy_for_test.h" | 65 #include "sync/api/attachments/attachment_service_proxy_for_test.h" |
66 #include "sync/api/fake_sync_change_processor.h" | 66 #include "sync/api/fake_sync_change_processor.h" |
67 #include "sync/api/sync_change.h" | 67 #include "sync/api/sync_change.h" |
(...skipping 1797 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1865 std::vector<PageUsageData*> results; | 1865 std::vector<PageUsageData*> results; |
1866 db_->QuerySegmentUsage(segment_time, 10, &results); | 1866 db_->QuerySegmentUsage(segment_time, 10, &results); |
1867 ASSERT_EQ(1u, results.size()); | 1867 ASSERT_EQ(1u, results.size()); |
1868 EXPECT_EQ(url, results[0]->GetURL()); | 1868 EXPECT_EQ(url, results[0]->GetURL()); |
1869 EXPECT_EQ(segment_id, results[0]->GetID()); | 1869 EXPECT_EQ(segment_id, results[0]->GetID()); |
1870 EXPECT_EQ(title, results[0]->GetTitle()); | 1870 EXPECT_EQ(title, results[0]->GetTitle()); |
1871 STLDeleteElements(&results); | 1871 STLDeleteElements(&results); |
1872 } | 1872 } |
1873 | 1873 |
1874 } // namespace history | 1874 } // namespace history |
OLD | NEW |