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

Side by Side Diff: components/bookmarks/browser/bookmark_expanded_state_tracker_unittest.cc

Issue 489373005: Omnibox: Make URLs of Bookmarks Searchable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: sky + pkasting's comments Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
58 void BookmarkExpandedStateTrackerTest::SetUp() { 58 void BookmarkExpandedStateTrackerTest::SetUp() {
59 prefs_ = PrefServiceForTesting(); 59 prefs_ = PrefServiceForTesting();
60 model_.reset(new BookmarkModel(&client_, false)); 60 model_.reset(new BookmarkModel(&client_));
61 model_->Load(prefs_.get(), 61 model_->Load(prefs_.get(),
62 std::string(), 62 std::string(),
63 base::FilePath(), 63 base::FilePath(),
64 base::MessageLoopProxy::current(), 64 base::MessageLoopProxy::current(),
65 base::MessageLoopProxy::current()); 65 base::MessageLoopProxy::current());
66 test::WaitForBookmarkModelToLoad(model_.get()); 66 test::WaitForBookmarkModelToLoad(model_.get());
67 } 67 }
68 68
69 void BookmarkExpandedStateTrackerTest::TearDown() { 69 void BookmarkExpandedStateTrackerTest::TearDown() {
70 model_.reset(); 70 model_.reset();
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « components/bookmarks/browser/bookmark_codec_unittest.cc ('k') | components/bookmarks/browser/bookmark_index.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698