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

Side by Side Diff: components/sync_sessions/revisit/typed_url_page_revisit_task_unittest.cc

Issue 2388973002: [Sync] Removing duplicate includes, part 2. (Closed)
Patch Set: Update for Max's comments. Created 4 years, 2 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/sync_sessions/revisit/typed_url_page_revisit_task.h" 5 #include "components/sync_sessions/revisit/typed_url_page_revisit_task.h"
6 6
7 #include "base/test/histogram_tester.h" 7 #include "base/test/histogram_tester.h"
8 #include "base/time/time.h" 8 #include "base/time/time.h"
9 #include "components/history/core/browser/history_backend.h" 9 #include "components/history/core/browser/history_backend.h"
10 #include "components/history/core/browser/history_types.h"
11 #include "components/sync_sessions/revisit/page_visit_observer.h"
12 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
13 #include "url/gurl.h"
14 11
15 namespace sync_sessions { 12 namespace sync_sessions {
16 13
17 namespace { 14 namespace {
18 15
19 class FakeTask : public TypedUrlPageRevisitTask { 16 class FakeTask : public TypedUrlPageRevisitTask {
20 public: 17 public:
21 FakeTask(const PageVisitObserver::TransitionType transition, 18 FakeTask(const PageVisitObserver::TransitionType transition,
22 bool result, 19 bool result,
23 const history::VisitVector& visits, 20 const history::VisitVector& visits,
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // No source for id 3. 138 // No source for id 3.
142 139
143 FakeTask task(PageVisitObserver::TransitionType::kTransitionPage, true, 140 FakeTask task(PageVisitObserver::TransitionType::kTransitionPage, true,
144 visits, sources); 141 visits, sources);
145 base::Time lastVisitTime; 142 base::Time lastVisitTime;
146 ASSERT_TRUE(task.FindLastSyncedMatchAge(nullptr, &lastVisitTime)); 143 ASSERT_TRUE(task.FindLastSyncedMatchAge(nullptr, &lastVisitTime));
147 ASSERT_EQ(expected, lastVisitTime); 144 ASSERT_EQ(expected, lastVisitTime);
148 } 145 }
149 146
150 } // namespace sync_sessions 147 } // namespace sync_sessions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698