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

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

Issue 1387253004: [Sync] Creating sync_sessions component, moving revisit logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removing test_support target. Created 5 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
« no previous file with comments | « components/sync_sessions/revisit/sessions_page_revisit_observer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_driver/revisit/sessions_page_revisit_observer.h" 5 #include "components/sync_sessions/revisit/sessions_page_revisit_observer.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/test/histogram_tester.h" 8 #include "base/test/histogram_tester.h"
9 #include "components/sessions/core/serialized_navigation_entry.h" 9 #include "components/sessions/core/serialized_navigation_entry.h"
10 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" 10 #include "components/sessions/core/serialized_navigation_entry_test_helper.h"
11 #include "components/sessions/core/session_types.h" 11 #include "components/sessions/core/session_types.h"
12 #include "components/sync_driver/glue/synced_session.h" 12 #include "components/sync_driver/glue/synced_session.h"
13 #include "components/sync_driver/revisit/page_visit_observer.h" 13 #include "components/sync_sessions/revisit/page_visit_observer.h"
14 #include "testing/gtest/include/gtest/gtest.h" 14 #include "testing/gtest/include/gtest/gtest.h"
15 #include "url/gurl.h" 15 #include "url/gurl.h"
16 16
17 using sessions::SessionTab; 17 using sessions::SessionTab;
18 using sessions::SessionWindow; 18 using sessions::SessionWindow;
19 using sync_driver::SyncedSession;
19 20
20 namespace sync_driver { 21 namespace sync_sessions {
21 22
22 namespace { 23 namespace {
23 24
24 static const std::string kExampleUrl = "http://www.example.com"; 25 static const std::string kExampleUrl = "http://www.example.com";
25 static const std::string kDifferentUrl = "http://www.different.com"; 26 static const std::string kDifferentUrl = "http://www.different.com";
26 27
27 class TestForeignSessionsProvider : public ForeignSessionsProvider { 28 class TestForeignSessionsProvider : public ForeignSessionsProvider {
28 public: 29 public:
29 TestForeignSessionsProvider(const std::vector<const SyncedSession*>& sessions, 30 TestForeignSessionsProvider(const std::vector<const SyncedSession*>& sessions,
30 bool return_value) 31 bool return_value)
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 std::vector<const SyncedSession*> sessions; 185 std::vector<const SyncedSession*> sessions;
185 sessions.push_back(session1.get()); 186 sessions.push_back(session1.get());
186 sessions.push_back(session2.get()); 187 sessions.push_back(session2.get());
187 SessionsPageRevisitObserver observer( 188 SessionsPageRevisitObserver observer(
188 make_scoped_ptr(new TestForeignSessionsProvider(sessions, true))); 189 make_scoped_ptr(new TestForeignSessionsProvider(sessions, true)));
189 190
190 base::HistogramTester histogram_tester; 191 base::HistogramTester histogram_tester;
191 CheckAndExpect(observer, GURL(kExampleUrl), true, true); 192 CheckAndExpect(observer, GURL(kExampleUrl), true, true);
192 } 193 }
193 194
194 } // namespace sync_driver 195 } // namespace sync_sessions
OLDNEW
« no previous file with comments | « components/sync_sessions/revisit/sessions_page_revisit_observer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698