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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc

Issue 2905243003: Cleanup BookmarkBubbleView, remove LocationBarBubbleDelegateView::GetDialogButtons() (Closed)
Patch Set: Rebase for r475249 Created 3 years, 7 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
Index: chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
index bd8313386b8dd4c221fece870f181e3a6d443f59..ade36962c18389bdebfef60aa8a669dc10597ef4 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view_unittest.cc
@@ -64,6 +64,11 @@ class BookmarkBubbleViewTest : public BrowserWithTestWindowTest {
bubble_.reset(new BookmarkBubbleView(NULL, NULL, std::move(delegate),
profile(), GURL(kTestBookmarkURL),
true));
+ bubble_->Init();
+ }
+
+ std::unique_ptr<views::View> CreateFootnoteView() {
+ return base::WrapUnique(bubble_->CreateFootnoteView());
}
void SetUpSigninManager(const std::string& username) {
@@ -86,16 +91,14 @@ class BookmarkBubbleViewTest : public BrowserWithTestWindowTest {
TEST_F(BookmarkBubbleViewTest, SyncPromoSignedIn) {
SetUpSigninManager("fake_username");
CreateBubbleView();
- bubble_->Init();
- std::unique_ptr<views::View> footnote(bubble_->CreateFootnoteView());
+ std::unique_ptr<views::View> footnote = CreateFootnoteView();
EXPECT_FALSE(footnote);
}
// Verifies that the sync promo is displayed for a user that is not signed in.
TEST_F(BookmarkBubbleViewTest, SyncPromoNotSignedIn) {
CreateBubbleView();
- bubble_->Init();
- std::unique_ptr<views::View> footnote(bubble_->CreateFootnoteView());
+ std::unique_ptr<views::View> footnote = CreateFootnoteView();
#if defined(OS_CHROMEOS)
EXPECT_FALSE(footnote);
#else // !defined(OS_CHROMEOS)

Powered by Google App Engine
This is Rietveld 408576698