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_sessions/revisit/bookmarks_page_revisit_observer.h" | 5 #include "components/sync_sessions/revisit/bookmarks_page_revisit_observer.h" |
6 | 6 |
7 #include <memory> | |
8 #include <vector> | |
9 | |
10 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
11 #include "base/test/histogram_tester.h" | 8 #include "base/test/histogram_tester.h" |
12 #include "components/bookmarks/browser/bookmark_node.h" | 9 #include "components/bookmarks/browser/bookmark_node.h" |
13 #include "components/sync_sessions/revisit/page_visit_observer.h" | |
14 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
15 #include "url/gurl.h" | 11 #include "url/gurl.h" |
16 | 12 |
17 namespace sync_sessions { | 13 namespace sync_sessions { |
18 | 14 |
19 namespace { | 15 namespace { |
20 | 16 |
21 static const GURL kExampleGurl = GURL("http://www.example.com"); | 17 static const GURL kExampleGurl = GURL("http://www.example.com"); |
22 | 18 |
23 class TestBookmarksByUrlProvider : public BookmarksByUrlProvider { | 19 class TestBookmarksByUrlProvider : public BookmarksByUrlProvider { |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 TEST(BookmarksPageRevisitObserver, MultipleMatchingBookmarks) { | 72 TEST(BookmarksPageRevisitObserver, MultipleMatchingBookmarks) { |
77 bookmarks::BookmarkNode node1(kExampleGurl); | 73 bookmarks::BookmarkNode node1(kExampleGurl); |
78 bookmarks::BookmarkNode node2(kExampleGurl); | 74 bookmarks::BookmarkNode node2(kExampleGurl); |
79 std::vector<const bookmarks::BookmarkNode*> nodes; | 75 std::vector<const bookmarks::BookmarkNode*> nodes; |
80 nodes.push_back(&node1); | 76 nodes.push_back(&node1); |
81 nodes.push_back(&node2); | 77 nodes.push_back(&node2); |
82 ExpectMatch(nodes); | 78 ExpectMatch(nodes); |
83 } | 79 } |
84 | 80 |
85 } // namespace sync_sessions | 81 } // namespace sync_sessions |
OLD | NEW |