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

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

Issue 1717453003: Introduce BubbleDialogDelegateView, which extends DialogDelegateView (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 9 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 <string> 7 #include <string>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 80
81 private: 81 private:
82 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleViewTest); 82 DISALLOW_COPY_AND_ASSIGN(BookmarkBubbleViewTest);
83 }; 83 };
84 84
85 // Verifies that the sync promo is not displayed for a signed in user. 85 // Verifies that the sync promo is not displayed for a signed in user.
86 TEST_F(BookmarkBubbleViewTest, SyncPromoSignedIn) { 86 TEST_F(BookmarkBubbleViewTest, SyncPromoSignedIn) {
87 SetUpSigninManager("fake_username"); 87 SetUpSigninManager("fake_username");
88 CreateBubbleView(); 88 CreateBubbleView();
89 bubble_->Init(); 89 bubble_->Init();
90 EXPECT_FALSE(bubble_->CreateFootnoteView()); 90 scoped_ptr<views::View> footnote(bubble_->CreateFootnoteView());
91 EXPECT_FALSE(footnote);
91 } 92 }
92 93
93 // Verifies that the sync promo is displayed for a user that is not signed in. 94 // Verifies that the sync promo is displayed for a user that is not signed in.
94 TEST_F(BookmarkBubbleViewTest, SyncPromoNotSignedIn) { 95 TEST_F(BookmarkBubbleViewTest, SyncPromoNotSignedIn) {
95 CreateBubbleView(); 96 CreateBubbleView();
96 bubble_->Init(); 97 bubble_->Init();
97 scoped_ptr<views::View> footnote = bubble_->CreateFootnoteView(); 98 scoped_ptr<views::View> footnote(bubble_->CreateFootnoteView());
98 #if defined(OS_CHROMEOS) 99 #if defined(OS_CHROMEOS)
99 EXPECT_FALSE(footnote); 100 EXPECT_FALSE(footnote);
100 #else // !defined(OS_CHROMEOS) 101 #else // !defined(OS_CHROMEOS)
101 EXPECT_TRUE(footnote); 102 EXPECT_TRUE(footnote);
102 #endif 103 #endif
103 } 104 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698