| OLD | NEW |
| (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/bookmarks/bookmark_bubble_sign_in_delegate.h" |
| 6 |
| 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h" |
| 9 #include "chrome/browser/ui/browser.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 11 #include "chrome/test/base/browser_with_test_window_test.h" |
| 12 #include "ui/base/events/event_constants.h" |
| 13 #include "ui/base/range/range.h" |
| 14 |
| 15 typedef BrowserWithTestWindowTest BookmarkBubbleSignInDelegateTest; |
| 16 |
| 17 TEST_F(BookmarkBubbleSignInDelegateTest, OnSignInLinkClicked) { |
| 18 int starting_tab_count = browser()->tab_strip_model()->count(); |
| 19 |
| 20 scoped_ptr<BookmarkBubbleDelegate> delegate; |
| 21 delegate.reset(new BookmarkBubbleSignInDelegate(browser())); |
| 22 |
| 23 delegate->OnSignInLinkClicked(); |
| 24 |
| 25 // A new tab should have been opened. |
| 26 int tab_count = browser()->tab_strip_model()->count(); |
| 27 EXPECT_EQ(starting_tab_count + 1, tab_count); |
| 28 } |
| OLD | NEW |