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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_menu_delegate_unittest.cc

Issue 2216713002: Use BookmarkModelFactory::GetForBrowserContext everywhere (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@bookmarks
Patch Set: Replace in .mm files Created 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/bookmarks/bookmark_model_factory.h" 9 #include "chrome/browser/bookmarks/bookmark_model_factory.h"
10 #include "chrome/browser/bookmarks/bookmark_stats.h" 10 #include "chrome/browser/bookmarks/bookmark_stats.h"
(...skipping 12 matching lines...) Expand all
23 23
24 class BookmarkMenuDelegateTest : public BrowserWithTestWindowTest { 24 class BookmarkMenuDelegateTest : public BrowserWithTestWindowTest {
25 public: 25 public:
26 BookmarkMenuDelegateTest() : model_(NULL) {} 26 BookmarkMenuDelegateTest() : model_(NULL) {}
27 27
28 void SetUp() override { 28 void SetUp() override {
29 BrowserWithTestWindowTest::SetUp(); 29 BrowserWithTestWindowTest::SetUp();
30 30
31 profile()->CreateBookmarkModel(true); 31 profile()->CreateBookmarkModel(true);
32 32
33 model_ = BookmarkModelFactory::GetForProfile(profile()); 33 model_ = BookmarkModelFactory::GetForBrowserContext(profile());
34 bookmarks::test::WaitForBookmarkModelToLoad(model_); 34 bookmarks::test::WaitForBookmarkModelToLoad(model_);
35 35
36 AddTestData(); 36 AddTestData();
37 } 37 }
38 38
39 void TearDown() override { 39 void TearDown() override {
40 DestroyDelegate(); 40 DestroyDelegate();
41 41
42 BrowserWithTestWindowTest::TearDown(); 42 BrowserWithTestWindowTest::TearDown();
43 } 43 }
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 while (model_->other_node()->child_count() > 1) 223 while (model_->other_node()->child_count() > 1)
224 model_->Remove(model_->other_node()->GetChild(1)); 224 model_->Remove(model_->other_node()->GetChild(1));
225 225
226 NewDelegate(); 226 NewDelegate();
227 bookmark_menu_delegate_->Init(&test_delegate, nullptr, node, 0, 227 bookmark_menu_delegate_->Init(&test_delegate, nullptr, node, 0,
228 BookmarkMenuDelegate::HIDE_PERMANENT_FOLDERS, 228 BookmarkMenuDelegate::HIDE_PERMANENT_FOLDERS,
229 BOOKMARK_LAUNCH_LOCATION_NONE); 229 BOOKMARK_LAUNCH_LOCATION_NONE);
230 // Any nodes on the bookmark bar should close on remove. 230 // Any nodes on the bookmark bar should close on remove.
231 EXPECT_TRUE(ShouldCloseOnRemove(model_->other_node()->GetChild(0))); 231 EXPECT_TRUE(ShouldCloseOnRemove(model_->other_node()->GetChild(0)));
232 } 232 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_menu_delegate.cc ('k') | chrome/browser/ui/views/toolbar/app_menu.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698