Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

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

Issue 870063002: Componentize TopSites, TopSitesBackend, TopSitesDatabase (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@815983002
Patch Set: Fix typo Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 29 matching lines...) Expand all
40 #include "base/strings/stringprintf.h" 40 #include "base/strings/stringprintf.h"
41 #include "base/strings/utf_string_conversions.h" 41 #include "base/strings/utf_string_conversions.h"
42 #include "base/task/cancelable_task_tracker.h" 42 #include "base/task/cancelable_task_tracker.h"
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/history_backend.h" 45 #include "chrome/browser/history/history_backend.h"
46 #include "chrome/browser/history/history_service.h" 46 #include "chrome/browser/history/history_service.h"
47 #include "chrome/browser/history/in_memory_history_backend.h" 47 #include "chrome/browser/history/in_memory_history_backend.h"
48 #include "chrome/common/chrome_constants.h" 48 #include "chrome/common/chrome_constants.h"
49 #include "chrome/common/chrome_paths.h" 49 #include "chrome/common/chrome_paths.h"
50 #include "chrome/tools/profiles/thumbnail-inl.h"
51 #include "components/history/content/browser/download_constants_utils.h" 50 #include "components/history/content/browser/download_constants_utils.h"
52 #include "components/history/content/browser/history_database_helper.h" 51 #include "components/history/content/browser/history_database_helper.h"
53 #include "components/history/core/browser/download_constants.h" 52 #include "components/history/core/browser/download_constants.h"
54 #include "components/history/core/browser/download_row.h" 53 #include "components/history/core/browser/download_row.h"
55 #include "components/history/core/browser/history_constants.h" 54 #include "components/history/core/browser/history_constants.h"
56 #include "components/history/core/browser/history_database.h" 55 #include "components/history/core/browser/history_database.h"
57 #include "components/history/core/browser/history_database_params.h" 56 #include "components/history/core/browser/history_database_params.h"
58 #include "components/history/core/browser/history_db_task.h" 57 #include "components/history/core/browser/history_db_task.h"
59 #include "components/history/core/browser/in_memory_database.h" 58 #include "components/history/core/browser/in_memory_database.h"
60 #include "components/history/core/browser/page_usage_data.h" 59 #include "components/history/core/browser/page_usage_data.h"
61 #include "components/history/core/common/thumbnail_score.h" 60 #include "components/history/core/common/thumbnail_score.h"
62 #include "components/history/core/test/history_unittest_base.h" 61 #include "components/history/core/test/history_unittest_base.h"
63 #include "components/history/core/test/test_history_database.h" 62 #include "components/history/core/test/test_history_database.h"
63 #include "components/history/core/test/thumbnail-inl.h"
64 #include "content/public/browser/download_item.h" 64 #include "content/public/browser/download_item.h"
65 #include "content/public/browser/notification_details.h" 65 #include "content/public/browser/notification_details.h"
66 #include "content/public/browser/notification_source.h" 66 #include "content/public/browser/notification_source.h"
67 #include "sql/connection.h" 67 #include "sql/connection.h"
68 #include "sql/statement.h" 68 #include "sql/statement.h"
69 #include "sync/api/attachments/attachment_id.h" 69 #include "sync/api/attachments/attachment_id.h"
70 #include "sync/api/fake_sync_change_processor.h" 70 #include "sync/api/fake_sync_change_processor.h"
71 #include "sync/api/sync_change.h" 71 #include "sync/api/sync_change.h"
72 #include "sync/api/sync_change_processor.h" 72 #include "sync/api/sync_change_processor.h"
73 #include "sync/api/sync_change_processor_wrapper_for_test.h" 73 #include "sync/api/sync_change_processor_wrapper_for_test.h"
(...skipping 1791 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « chrome/browser/history/expire_history_backend_unittest.cc ('k') | chrome/browser/history/top_sites.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698