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

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

Issue 1081923002: Remove PrerenderLocalPredictor, part 5. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@prerender-local-predictor-4
Patch Set: Created 5 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
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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 // This must be outside the anonymous namespace for the friend statement in 93 // This must be outside the anonymous namespace for the friend statement in
94 // HistoryBackendDBTest to work. 94 // HistoryBackendDBTest to work.
95 class BackendDelegate : public HistoryBackend::Delegate { 95 class BackendDelegate : public HistoryBackend::Delegate {
96 public: 96 public:
97 explicit BackendDelegate(HistoryBackendDBTest* history_test) 97 explicit BackendDelegate(HistoryBackendDBTest* history_test)
98 : history_test_(history_test) { 98 : history_test_(history_test) {
99 } 99 }
100 100
101 void NotifyProfileError(sql::InitStatus init_status) override {} 101 void NotifyProfileError(sql::InitStatus init_status) override {}
102 void SetInMemoryBackend(scoped_ptr<InMemoryHistoryBackend> backend) override; 102 void SetInMemoryBackend(scoped_ptr<InMemoryHistoryBackend> backend) override;
103 void NotifyAddVisit(const BriefVisitInfo& info) override {}
104 void NotifyFaviconChanged(const std::set<GURL>& url) override {} 103 void NotifyFaviconChanged(const std::set<GURL>& url) override {}
105 void NotifyURLVisited(ui::PageTransition transition, 104 void NotifyURLVisited(ui::PageTransition transition,
106 const URLRow& row, 105 const URLRow& row,
107 const RedirectList& redirects, 106 const RedirectList& redirects,
108 base::Time visit_time) override {} 107 base::Time visit_time) override {}
109 void NotifyURLsModified(const URLRows& changed_urls) override {} 108 void NotifyURLsModified(const URLRows& changed_urls) override {}
110 void NotifyURLsDeleted(bool all_history, 109 void NotifyURLsDeleted(bool all_history,
111 bool expired, 110 bool expired,
112 const URLRows& deleted_rows, 111 const URLRows& deleted_rows,
113 const std::set<GURL>& favicon_urls) override {} 112 const std::set<GURL>& favicon_urls) override {}
(...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after
1858 std::vector<PageUsageData*> results; 1857 std::vector<PageUsageData*> results;
1859 db_->QuerySegmentUsage(segment_time, 10, &results); 1858 db_->QuerySegmentUsage(segment_time, 10, &results);
1860 ASSERT_EQ(1u, results.size()); 1859 ASSERT_EQ(1u, results.size());
1861 EXPECT_EQ(url, results[0]->GetURL()); 1860 EXPECT_EQ(url, results[0]->GetURL());
1862 EXPECT_EQ(segment_id, results[0]->GetID()); 1861 EXPECT_EQ(segment_id, results[0]->GetID());
1863 EXPECT_EQ(title, results[0]->GetTitle()); 1862 EXPECT_EQ(title, results[0]->GetTitle());
1864 STLDeleteElements(&results); 1863 STLDeleteElements(&results);
1865 } 1864 }
1866 1865
1867 } // namespace history 1866 } // namespace history
OLDNEW
« no previous file with comments | « chrome/browser/history/history_backend_unittest.cc ('k') | components/history/core/browser/history_backend.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698