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

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

Issue 10067018: Add PrerenderLocalPredictor, which will eventually perform (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/history/history_types.h ('k') | chrome/browser/history/visit_database.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 } 87 }
88 88
89 virtual void NotifyProfileError(int backend_id, 89 virtual void NotifyProfileError(int backend_id,
90 sql::InitStatus init_status) OVERRIDE {} 90 sql::InitStatus init_status) OVERRIDE {}
91 virtual void SetInMemoryBackend(int backend_id, 91 virtual void SetInMemoryBackend(int backend_id,
92 InMemoryHistoryBackend* backend) OVERRIDE; 92 InMemoryHistoryBackend* backend) OVERRIDE;
93 virtual void BroadcastNotifications(int type, 93 virtual void BroadcastNotifications(int type,
94 HistoryDetails* details) OVERRIDE; 94 HistoryDetails* details) OVERRIDE;
95 virtual void DBLoaded(int backend_id) OVERRIDE {} 95 virtual void DBLoaded(int backend_id) OVERRIDE {}
96 virtual void StartTopSitesMigration(int backend_id) OVERRIDE {} 96 virtual void StartTopSitesMigration(int backend_id) OVERRIDE {}
97 virtual void NotifyVisitDBObserversOnAddVisit(
98 const BriefVisitInfo& info) OVERRIDE {}
97 private: 99 private:
98 HistoryTest* history_test_; 100 HistoryTest* history_test_;
99 }; 101 };
100 102
101 // This must be outside the anonymous namespace for the friend statement in 103 // This must be outside the anonymous namespace for the friend statement in
102 // HistoryBackend to work. 104 // HistoryBackend to work.
103 class HistoryTest : public testing::Test { 105 class HistoryTest : public testing::Test {
104 public: 106 public:
105 HistoryTest() 107 HistoryTest()
106 : history_service_(NULL), 108 : history_service_(NULL),
(...skipping 847 matching lines...) Expand 10 before | Expand all | Expand 10 after
954 history_service_ = history; 956 history_service_ = history;
955 history->ScheduleDBTask(task.get(), &request_consumer); 957 history->ScheduleDBTask(task.get(), &request_consumer);
956 request_consumer.CancelAllRequests(); 958 request_consumer.CancelAllRequests();
957 CleanupHistoryService(); 959 CleanupHistoryService();
958 // WARNING: history has now been deleted. 960 // WARNING: history has now been deleted.
959 history = NULL; 961 history = NULL;
960 ASSERT_FALSE(task->done_invoked); 962 ASSERT_FALSE(task->done_invoked);
961 } 963 }
962 964
963 } // namespace history 965 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_types.h ('k') | chrome/browser/history/visit_database.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698