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

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

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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_bubble_links_delegate.h" 5 #include "chrome/browser/ui/sync/one_click_signin_bubble_links_delegate.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 OneClickSigninBubbleLinksDelegateBrowserTest; 11 typedef InProcessBrowserTest OneClickSigninBubbleLinksDelegateBrowserTest;
12 12
13 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest, 13 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest,
14 AdvancedLink) { 14 AdvancedLink) {
15 scoped_ptr<OneClickSigninBubbleDelegate> delegate_; 15 std::unique_ptr<OneClickSigninBubbleDelegate> delegate_;
16 delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser())); 16 delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser()));
17 17
18 int starting_tab_count = browser()->tab_strip_model()->count(); 18 int starting_tab_count = browser()->tab_strip_model()->count();
19 19
20 // The current tab should be replaced. 20 // The current tab should be replaced.
21 delegate_->OnAdvancedLinkClicked(); 21 delegate_->OnAdvancedLinkClicked();
22 22
23 int tab_count = browser()->tab_strip_model()->count(); 23 int tab_count = browser()->tab_strip_model()->count();
24 EXPECT_EQ(starting_tab_count, tab_count); 24 EXPECT_EQ(starting_tab_count, tab_count);
25 } 25 }
26 26
27 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest, 27 IN_PROC_BROWSER_TEST_F(OneClickSigninBubbleLinksDelegateBrowserTest,
28 LearnMoreLink) { 28 LearnMoreLink) {
29 scoped_ptr<OneClickSigninBubbleDelegate> delegate_; 29 std::unique_ptr<OneClickSigninBubbleDelegate> delegate_;
30 delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser())); 30 delegate_.reset(new OneClickSigninBubbleLinksDelegate(browser()));
31 31
32 int starting_tab_count = browser()->tab_strip_model()->count(); 32 int starting_tab_count = browser()->tab_strip_model()->count();
33 33
34 // A new tab should be opened. 34 // A new tab should be opened.
35 delegate_->OnLearnMoreLinkClicked(false); 35 delegate_->OnLearnMoreLinkClicked(false);
36 36
37 int tab_count = browser()->tab_strip_model()->count(); 37 int tab_count = browser()->tab_strip_model()->count();
38 EXPECT_EQ(starting_tab_count + 1, tab_count); 38 EXPECT_EQ(starting_tab_count + 1, tab_count);
39 } 39 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698