Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / sync / one_click_signin_bubble_links_delegate_browsertest.cc
blob4ffa307626eb1940548d2d6278bee2a0b9bb8e12
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.
5 #include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.h"
7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/test/base/in_process_browser_test.h"
11 typedef InProcessBrowserTest OneClickSigninBubbleLinksDelegateBrowserTest;
13 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest,
14 AdvancedLink) {
15 scoped_ptr<OneClickSigninBubbleDelegate> delegate_;
16 delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser()));
18 int starting_tab_count = browser()->tab_strip_model()->count();
20 // The current tab should be replaced.
21 delegate_->OnAdvancedLinkClicked();
23 int tab_count = browser()->tab_strip_model()->count();
24 EXPECT_EQ(starting_tab_count, tab_count);
27 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest,
28 LearnMoreLink) {
29 scoped_ptr<OneClickSigninBubbleDelegate> delegate_;
30 delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser()));
32 int starting_tab_count = browser()->tab_strip_model()->count();
34 // A new tab should be opened.
35 delegate_->OnLearnMoreLinkClicked(false);
37 int tab_count = browser()->tab_strip_model()->count();
38 EXPECT_EQ(starting_tab_count + 1, tab_count);