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

Side by Side Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view_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_bubble_view.h" 5 #include "chrome/browser/ui/views/bookmarks/bookmark_bubble_view.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 17 matching lines...) Expand all
28 class BookmarkBubbleViewTest : public BrowserWithTestWindowTest { 28 class BookmarkBubbleViewTest : public BrowserWithTestWindowTest {
29 public: 29 public:
30 BookmarkBubbleViewTest() {} 30 BookmarkBubbleViewTest() {}
31 31
32 // testing::Test: 32 // testing::Test:
33 void SetUp() override { 33 void SetUp() override {
34 BrowserWithTestWindowTest::SetUp(); 34 BrowserWithTestWindowTest::SetUp();
35 35
36 profile()->CreateBookmarkModel(true); 36 profile()->CreateBookmarkModel(true);
37 BookmarkModel* bookmark_model = 37 BookmarkModel* bookmark_model =
38 BookmarkModelFactory::GetForProfile(profile()); 38 BookmarkModelFactory::GetForBrowserContext(profile());
39 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model); 39 bookmarks::test::WaitForBookmarkModelToLoad(bookmark_model);
40 40
41 bookmarks::AddIfNotBookmarked( 41 bookmarks::AddIfNotBookmarked(
42 bookmark_model, GURL(kTestBookmarkURL), base::string16()); 42 bookmark_model, GURL(kTestBookmarkURL), base::string16());
43 } 43 }
44 44
45 void TearDown() override { 45 void TearDown() override {
46 // Make sure the bubble is destroyed before the profile to avoid a crash. 46 // Make sure the bubble is destroyed before the profile to avoid a crash.
47 bubble_.reset(); 47 bubble_.reset();
48 48
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 TEST_F(BookmarkBubbleViewTest, SyncPromoNotSignedIn) { 95 TEST_F(BookmarkBubbleViewTest, SyncPromoNotSignedIn) {
96 CreateBubbleView(); 96 CreateBubbleView();
97 bubble_->Init(); 97 bubble_->Init();
98 std::unique_ptr<views::View> footnote(bubble_->CreateFootnoteView()); 98 std::unique_ptr<views::View> footnote(bubble_->CreateFootnoteView());
99 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
100 EXPECT_FALSE(footnote); 100 EXPECT_FALSE(footnote);
101 #else // !defined(OS_CHROMEOS) 101 #else // !defined(OS_CHROMEOS)
102 EXPECT_TRUE(footnote); 102 EXPECT_TRUE(footnote);
103 #endif 103 #endif
104 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698