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

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

Issue 18603006: Bookmark sync promo for Views. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: BookmarkBubbleView independant from browser, layout_constants and CAPS for enum Created 7 years, 5 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/ui/views/bookmarks/bookmark_sync_promo_view.h"
6
7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/test/base/browser_with_test_window_test.h"
10 #include "ui/base/events/event_constants.h"
11 #include "ui/base/range/range.h"
12
13 typedef BrowserWithTestWindowTest BookmarkSyncPromoViewTest;
14
15 TEST_F(BookmarkSyncPromoViewTest, SignInLink) {
16 int starting_tab_count = browser()->tab_strip_model()->count();
17 BookmarkSyncPromoView* view = new BookmarkSyncPromoView(browser());
18
19 // Simulate clicking the "Sign in" link.
20 views::StyledLabelListener* listener = view;
21 listener->StyledLabelLinkClicked(ui::Range(), ui::EF_NONE);
22
23 // A new tab should have been opened.
24 int tab_count = browser()->tab_strip_model()->count();
25 EXPECT_EQ(starting_tab_count + 1, tab_count);
26 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698