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

Unified Diff: components/undo/bookmark_undo_service_test.cc

Issue 1198963014: Change ownership of BookmarkClient (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cleanup_managed_and_supervised_nodes
Patch Set: Rebase Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/undo/bookmark_undo_service_test.cc
diff --git a/components/undo/bookmark_undo_service_test.cc b/components/undo/bookmark_undo_service_test.cc
index 2e989fda25e2dec2febfbf8b2360d44cc9d80e98..d27f16ba8e1d0708318d50922ca82de2d4d24c96 100644
--- a/components/undo/bookmark_undo_service_test.cc
+++ b/components/undo/bookmark_undo_service_test.cc
@@ -27,7 +27,6 @@ class BookmarkUndoServiceTest : public testing::Test {
BookmarkUndoService* GetUndoService();
private:
- scoped_ptr<bookmarks::TestBookmarkClient> test_bookmark_client_;
scoped_ptr<bookmarks::BookmarkModel> bookmark_model_;
scoped_ptr<BookmarkUndoService> bookmark_undo_service_;
@@ -37,11 +36,9 @@ class BookmarkUndoServiceTest : public testing::Test {
BookmarkUndoServiceTest::BookmarkUndoServiceTest() {}
void BookmarkUndoServiceTest::SetUp() {
- DCHECK(!test_bookmark_client_);
DCHECK(!bookmark_model_);
DCHECK(!bookmark_undo_service_);
- test_bookmark_client_.reset(new bookmarks::TestBookmarkClient);
- bookmark_model_ = test_bookmark_client_->CreateModel();
+ bookmark_model_ = bookmarks::TestBookmarkClient::CreateModel();
bookmark_undo_service_.reset(new BookmarkUndoService);
bookmark_undo_service_->Start(bookmark_model_.get());
bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model_.get());
@@ -59,10 +56,8 @@ void BookmarkUndoServiceTest::TearDown() {
// Implement two-phase KeyedService shutdown for test KeyedServices.
bookmark_undo_service_->Shutdown();
bookmark_model_->Shutdown();
- test_bookmark_client_->Shutdown();
bookmark_undo_service_.reset();
bookmark_model_.reset();
- test_bookmark_client_.reset();
}
TEST_F(BookmarkUndoServiceTest, AddBookmark) {
« no previous file with comments | « components/enhanced_bookmarks/enhanced_bookmark_model_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698