OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/bookmarks/browser/bookmark_expanded_state_tracker.h" | 5 #include "components/bookmarks/browser/bookmark_expanded_state_tracker.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/prefs/pref_service_factory.h" | 10 #include "base/prefs/pref_service_factory.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 public: | 37 public: |
38 BookmarkExpandedStateTrackerTest(); | 38 BookmarkExpandedStateTrackerTest(); |
39 virtual ~BookmarkExpandedStateTrackerTest(); | 39 virtual ~BookmarkExpandedStateTrackerTest(); |
40 | 40 |
41 protected: | 41 protected: |
42 // testing::Test: | 42 // testing::Test: |
43 virtual void SetUp() OVERRIDE; | 43 virtual void SetUp() OVERRIDE; |
44 virtual void TearDown() OVERRIDE; | 44 virtual void TearDown() OVERRIDE; |
45 | 45 |
46 base::MessageLoop message_loop_; | 46 base::MessageLoop message_loop_; |
47 test::TestBookmarkClient client_; | 47 TestBookmarkClient client_; |
48 scoped_ptr<PrefService> prefs_; | 48 scoped_ptr<PrefService> prefs_; |
49 scoped_ptr<BookmarkModel> model_; | 49 scoped_ptr<BookmarkModel> model_; |
50 | 50 |
51 DISALLOW_COPY_AND_ASSIGN(BookmarkExpandedStateTrackerTest); | 51 DISALLOW_COPY_AND_ASSIGN(BookmarkExpandedStateTrackerTest); |
52 }; | 52 }; |
53 | 53 |
54 BookmarkExpandedStateTrackerTest::BookmarkExpandedStateTrackerTest() {} | 54 BookmarkExpandedStateTrackerTest::BookmarkExpandedStateTrackerTest() {} |
55 | 55 |
56 BookmarkExpandedStateTrackerTest::~BookmarkExpandedStateTrackerTest() {} | 56 BookmarkExpandedStateTrackerTest::~BookmarkExpandedStateTrackerTest() {} |
57 | 57 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
107 tracker->SetExpandedNodes(nodes); | 107 tracker->SetExpandedNodes(nodes); |
108 // Verify that the node is present. | 108 // Verify that the node is present. |
109 EXPECT_EQ(nodes, tracker->GetExpandedNodes()); | 109 EXPECT_EQ(nodes, tracker->GetExpandedNodes()); |
110 // Call remove all. | 110 // Call remove all. |
111 model_->RemoveAllUserBookmarks(); | 111 model_->RemoveAllUserBookmarks(); |
112 // Verify node is not present. | 112 // Verify node is not present. |
113 EXPECT_TRUE(tracker->GetExpandedNodes().empty()); | 113 EXPECT_TRUE(tracker->GetExpandedNodes().empty()); |
114 } | 114 } |
115 | 115 |
116 } // namespace bookmarks | 116 } // namespace bookmarks |
OLD | NEW |