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

Side by Side Diff: chrome/browser/signin/signin_browsertest.cc

Issue 296703011: Change refs from ChromeSigninClient to base SigninClient class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 7 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 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_ 5 #ifndef CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_
6 #define CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_ 6 #define CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_
7 7
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "chrome/browser/signin/chrome_signin_client.h" 9 #include "chrome/browser/signin/chrome_signin_client.h"
10 #include "chrome/browser/signin/chrome_signin_client_factory.h" 10 #include "chrome/browser/signin/chrome_signin_client_factory.h"
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
100 const bool kOneClickSigninEnabled = false; 100 const bool kOneClickSigninEnabled = false;
101 #endif 101 #endif
102 102
103 // Disabled on Windows due to flakiness. http://crbug.com/249055 103 // Disabled on Windows due to flakiness. http://crbug.com/249055
104 #if defined(OS_WIN) 104 #if defined(OS_WIN)
105 #define MAYBE_ProcessIsolation DISABLED_ProcessIsolation 105 #define MAYBE_ProcessIsolation DISABLED_ProcessIsolation
106 #else 106 #else
107 #define MAYBE_ProcessIsolation ProcessIsolation 107 #define MAYBE_ProcessIsolation ProcessIsolation
108 #endif 108 #endif
109 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, MAYBE_ProcessIsolation) { 109 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, MAYBE_ProcessIsolation) {
110 ChromeSigninClient* signin = 110 SigninClient* signin =
111 ChromeSigninClientFactory::GetForProfile(browser()->profile()); 111 ChromeSigninClientFactory::GetForProfile(browser()->profile());
112 EXPECT_FALSE(signin->HasSigninProcess()); 112 EXPECT_FALSE(signin->HasSigninProcess());
113 113
114 ui_test_utils::NavigateToURL(browser(), signin::GetPromoURL( 114 ui_test_utils::NavigateToURL(browser(), signin::GetPromoURL(
115 signin::SOURCE_NTP_LINK, true)); 115 signin::SOURCE_NTP_LINK, true));
116 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess()); 116 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess());
117 117
118 // Navigating away should change the process. 118 // Navigating away should change the process.
119 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIOmniboxURL)); 119 ui_test_utils::NavigateToURL(browser(), GURL(chrome::kChromeUIOmniboxURL));
120 EXPECT_FALSE(signin->HasSigninProcess()); 120 EXPECT_FALSE(signin->HasSigninProcess());
(...skipping 28 matching lines...) Expand all
149 } 149 }
150 150
151 #if defined (OS_MACOSX) 151 #if defined (OS_MACOSX)
152 // crbug.com/375197 152 // crbug.com/375197
153 #define MAYBE_NotTrustedAfterRedirect DISABLED_NotTrustedAfterRedirect 153 #define MAYBE_NotTrustedAfterRedirect DISABLED_NotTrustedAfterRedirect
154 #else 154 #else
155 #define MAYBE_NotTrustedAfterRedirect NotTrustedAfterRedirect 155 #define MAYBE_NotTrustedAfterRedirect NotTrustedAfterRedirect
156 #endif 156 #endif
157 157
158 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, MAYBE_NotTrustedAfterRedirect) { 158 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, MAYBE_NotTrustedAfterRedirect) {
159 ChromeSigninClient* signin = 159 SigninClient* signin =
160 ChromeSigninClientFactory::GetForProfile(browser()->profile()); 160 ChromeSigninClientFactory::GetForProfile(browser()->profile());
161 EXPECT_FALSE(signin->HasSigninProcess()); 161 EXPECT_FALSE(signin->HasSigninProcess());
162 162
163 GURL url = signin::GetPromoURL(signin::SOURCE_NTP_LINK, true); 163 GURL url = signin::GetPromoURL(signin::SOURCE_NTP_LINK, true);
164 ui_test_utils::NavigateToURL(browser(), url); 164 ui_test_utils::NavigateToURL(browser(), url);
165 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess()); 165 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess());
166 166
167 // Navigating in a different tab should not affect the sign-in process. 167 // Navigating in a different tab should not affect the sign-in process.
168 ui_test_utils::NavigateToURLWithDisposition( 168 ui_test_utils::NavigateToURLWithDisposition(
169 browser(), GURL(kNonSigninURL), NEW_BACKGROUND_TAB, 169 browser(), GURL(kNonSigninURL), NEW_BACKGROUND_TAB,
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 206
207 // This is a test for http://crbug.com/257277. It simulates the navigations 207 // This is a test for http://crbug.com/257277. It simulates the navigations
208 // that occur if the user clicks on the "Skip for now" link at the signin page 208 // that occur if the user clicks on the "Skip for now" link at the signin page
209 // and initiates a back navigation between the point of Commit and 209 // and initiates a back navigation between the point of Commit and
210 // DidStopLoading of the NTP. 210 // DidStopLoading of the NTP.
211 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, SigninSkipForNowAndGoBack) { 211 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, SigninSkipForNowAndGoBack) {
212 GURL ntp_url(chrome::kChromeUINewTabURL); 212 GURL ntp_url(chrome::kChromeUINewTabURL);
213 GURL start_url = signin::GetPromoURL(signin::SOURCE_START_PAGE, false); 213 GURL start_url = signin::GetPromoURL(signin::SOURCE_START_PAGE, false);
214 GURL skip_url = signin::GetLandingURL("ntp", 1); 214 GURL skip_url = signin::GetLandingURL("ntp", 1);
215 215
216 ChromeSigninClient* signin = 216 SigninClient* signin =
217 ChromeSigninClientFactory::GetForProfile(browser()->profile()); 217 ChromeSigninClientFactory::GetForProfile(browser()->profile());
218 EXPECT_FALSE(signin->HasSigninProcess()); 218 EXPECT_FALSE(signin->HasSigninProcess());
219 219
220 ui_test_utils::NavigateToURL(browser(), start_url); 220 ui_test_utils::NavigateToURL(browser(), start_url);
221 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess()); 221 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess());
222 222
223 content::WebContents* web_contents = 223 content::WebContents* web_contents =
224 browser()->tab_strip_model()->GetActiveWebContents(); 224 browser()->tab_strip_model()->GetActiveWebContents();
225 225
226 // Simulate clicking on the Skip for now link. It's important to have a 226 // Simulate clicking on the Skip for now link. It's important to have a
(...skipping 17 matching lines...) Expand all
244 EXPECT_EQ(skip_url, web_contents->GetLastCommittedURL()); 244 EXPECT_EQ(skip_url, web_contents->GetLastCommittedURL());
245 EXPECT_EQ(start_url, web_contents->GetVisibleURL()); 245 EXPECT_EQ(start_url, web_contents->GetVisibleURL());
246 246
247 content::WindowedNotificationObserver observer( 247 content::WindowedNotificationObserver observer(
248 content::NOTIFICATION_LOAD_STOP, 248 content::NOTIFICATION_LOAD_STOP,
249 content::NotificationService::AllSources()); 249 content::NotificationService::AllSources());
250 observer.Wait(); 250 observer.Wait();
251 EXPECT_EQ(start_url, web_contents->GetLastCommittedURL()); 251 EXPECT_EQ(start_url, web_contents->GetLastCommittedURL());
252 } 252 }
253 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_ 253 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/chrome_signin_client_factory.cc ('k') | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698