| Index: chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate_unittest.cc
|
| diff --git a/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate_unittest.cc b/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate_unittest.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..261e5cc8ac9596340e766fcb0027736d683ea2a3
|
| --- /dev/null
|
| +++ b/chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate_unittest.cc
|
| @@ -0,0 +1,28 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "chrome/browser/ui/bookmarks/bookmark_bubble_sign_in_delegate.h"
|
| +
|
| +#include "base/memory/scoped_ptr.h"
|
| +#include "chrome/browser/ui/bookmarks/bookmark_bubble_delegate.h"
|
| +#include "chrome/browser/ui/browser.h"
|
| +#include "chrome/browser/ui/tabs/tab_strip_model.h"
|
| +#include "chrome/test/base/browser_with_test_window_test.h"
|
| +#include "ui/base/events/event_constants.h"
|
| +#include "ui/base/range/range.h"
|
| +
|
| +typedef BrowserWithTestWindowTest BookmarkBubbleSignInDelegateTest;
|
| +
|
| +TEST_F(BookmarkBubbleSignInDelegateTest, OnSignInLinkClicked) {
|
| + int starting_tab_count = browser()->tab_strip_model()->count();
|
| +
|
| + scoped_ptr<BookmarkBubbleDelegate> delegate;
|
| + delegate.reset(new BookmarkBubbleSignInDelegate(browser()));
|
| +
|
| + delegate->OnSignInLinkClicked();
|
| +
|
| + // A new tab should have been opened.
|
| + int tab_count = browser()->tab_strip_model()->count();
|
| + EXPECT_EQ(starting_tab_count + 1, tab_count);
|
| +}
|
|
|