OLD | NEW |
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/offset_tab_matcher.h" | 5 #include "components/sync_sessions/revisit/offset_tab_matcher.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 "base/time/time.h" | 9 #include "base/time/time.h" |
10 #include "components/sessions/core/serialized_navigation_entry.h" | 10 #include "components/sessions/core/serialized_navigation_entry.h" |
11 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" | 11 #include "components/sessions/core/serialized_navigation_entry_test_helper.h" |
12 #include "components/sessions/core/session_types.h" | 12 #include "components/sessions/core/session_types.h" |
13 #include "components/sync_driver/revisit/page_equality.h" | 13 #include "components/sync_sessions/revisit/page_equality.h" |
| 14 #include "components/sync_sessions/revisit/page_visit_observer.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "url/gurl.h" | 16 #include "url/gurl.h" |
16 | 17 |
17 using sessions::SessionTab; | 18 using sessions::SessionTab; |
18 | 19 |
19 namespace sync_driver { | 20 namespace sync_sessions { |
20 | 21 |
21 namespace { | 22 namespace { |
22 | 23 |
23 static const std::string kExampleUrl = "http://www.example.com"; | 24 static const std::string kExampleUrl = "http://www.example.com"; |
24 static const std::string kDifferentUrl = "http://www.different.com"; | 25 static const std::string kDifferentUrl = "http://www.different.com"; |
25 | 26 |
26 sessions::SerializedNavigationEntry Entry(const std::string& url) { | 27 sessions::SerializedNavigationEntry Entry(const std::string& url) { |
27 return sessions::SerializedNavigationEntryTestHelper::CreateNavigation(url, | 28 return sessions::SerializedNavigationEntryTestHelper::CreateNavigation(url, |
28 ""); | 29 ""); |
29 } | 30 } |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 scoped_ptr<SessionTab> tab2 = Tab(1, shared_now); | 177 scoped_ptr<SessionTab> tab2 = Tab(1, shared_now); |
177 tab2->navigations.push_back(Entry(kExampleUrl)); | 178 tab2->navigations.push_back(Entry(kExampleUrl)); |
178 tab2->navigations.push_back(Entry(kExampleUrl)); | 179 tab2->navigations.push_back(Entry(kExampleUrl)); |
179 | 180 |
180 OffsetTabMatcher matcher((PageEquality(GURL(kExampleUrl)))); | 181 OffsetTabMatcher matcher((PageEquality(GURL(kExampleUrl)))); |
181 matcher.Check(tab1.get()); | 182 matcher.Check(tab1.get()); |
182 matcher.Check(tab2.get()); | 183 matcher.Check(tab2.get()); |
183 VerifyMatch(matcher, 1); | 184 VerifyMatch(matcher, 1); |
184 } | 185 } |
185 | 186 |
186 } // namespace sync_driver | 187 } // namespace sync_sessions |
OLD | NEW |