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

Side by Side Diff: chrome/browser/ui/sync/one_click_signin_links_delegate_impl_browsertest.cc

Issue 2689773002: [Sync] Replace typedef with using. (Closed)
Patch Set: [Sync] Replace typedef with using. Created 3 years, 10 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/sync/one_click_signin_links_delegate_impl.h" 5 #include "chrome/browser/ui/sync/one_click_signin_links_delegate_impl.h"
6 6
7 #include "chrome/browser/ui/browser.h" 7 #include "chrome/browser/ui/browser.h"
8 #include "chrome/browser/ui/tabs/tab_strip_model.h" 8 #include "chrome/browser/ui/tabs/tab_strip_model.h"
9 #include "chrome/test/base/in_process_browser_test.h" 9 #include "chrome/test/base/in_process_browser_test.h"
10 10
11 typedef InProcessBrowserTest OneClickSigninLinksDelegateBrowserTest; 11 using OneClickSigninLinksDelegateBrowserTest = InProcessBrowserTest;
12 12
13 IN_PROC_BROWSER_TEST_F(OneClickSigninLinksDelegateBrowserTest, AdvancedLink) { 13 IN_PROC_BROWSER_TEST_F(OneClickSigninLinksDelegateBrowserTest, AdvancedLink) {
14 std::unique_ptr<OneClickSigninLinksDelegate> delegate_( 14 std::unique_ptr<OneClickSigninLinksDelegate> delegate_(
15 new OneClickSigninLinksDelegateImpl(browser())); 15 new OneClickSigninLinksDelegateImpl(browser()));
16 16
17 int starting_tab_count = browser()->tab_strip_model()->count(); 17 int starting_tab_count = browser()->tab_strip_model()->count();
18 18
19 // The current tab should be replaced. 19 // The current tab should be replaced.
20 delegate_->OnAdvancedLinkClicked(); 20 delegate_->OnAdvancedLinkClicked();
21 21
22 int tab_count = browser()->tab_strip_model()->count(); 22 int tab_count = browser()->tab_strip_model()->count();
23 EXPECT_EQ(starting_tab_count, tab_count); 23 EXPECT_EQ(starting_tab_count, tab_count);
24 } 24 }
25 25
26 IN_PROC_BROWSER_TEST_F(OneClickSigninLinksDelegateBrowserTest, LearnMoreLink) { 26 IN_PROC_BROWSER_TEST_F(OneClickSigninLinksDelegateBrowserTest, LearnMoreLink) {
27 std::unique_ptr<OneClickSigninLinksDelegate> delegate_( 27 std::unique_ptr<OneClickSigninLinksDelegate> delegate_(
28 new OneClickSigninLinksDelegateImpl(browser())); 28 new OneClickSigninLinksDelegateImpl(browser()));
29 29
30 int starting_tab_count = browser()->tab_strip_model()->count(); 30 int starting_tab_count = browser()->tab_strip_model()->count();
31 31
32 // A new tab should be opened. 32 // A new tab should be opened.
33 delegate_->OnLearnMoreLinkClicked(false); 33 delegate_->OnLearnMoreLinkClicked(false);
34 34
35 int tab_count = browser()->tab_strip_model()->count(); 35 int tab_count = browser()->tab_strip_model()->count();
36 EXPECT_EQ(starting_tab_count + 1, tab_count); 36 EXPECT_EQ(starting_tab_count + 1, tab_count);
37 } 37 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698