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

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

Issue 17962003: Fix regression: only clear sign-in process for navigations in that process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/signin_manager.h" 9 #include "chrome/browser/signin/signin_manager.h"
10 #include "chrome/browser/signin/signin_manager_factory.h" 10 #include "chrome/browser/signin/signin_manager_factory.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, NotTrustedAfterRedirect) { 142 IN_PROC_BROWSER_TEST_F(SigninBrowserTest, NotTrustedAfterRedirect) {
143 SigninManager* signin = SigninManagerFactory::GetForProfile( 143 SigninManager* signin = SigninManagerFactory::GetForProfile(
144 browser()->profile()); 144 browser()->profile());
145 EXPECT_FALSE(signin->HasSigninProcess()); 145 EXPECT_FALSE(signin->HasSigninProcess());
146 146
147 GURL url = SyncPromoUI::GetSyncPromoURL(SyncPromoUI::SOURCE_NTP_LINK, true); 147 GURL url = SyncPromoUI::GetSyncPromoURL(SyncPromoUI::SOURCE_NTP_LINK, true);
148 ui_test_utils::NavigateToURL(browser(), url); 148 ui_test_utils::NavigateToURL(browser(), url);
149 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess()); 149 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess());
150 150
151 // Navigating away should change the process. 151 // Navigating in a different tab should not affect the sign-in process.
152 ui_test_utils::NavigateToURLWithDisposition(
153 browser(), GURL(kNonSigninURL), NEW_BACKGROUND_TAB,
154 ui_test_utils::BROWSER_TEST_WAIT_FOR_NAVIGATION);
155 EXPECT_EQ(kOneClickSigninEnabled, signin->HasSigninProcess());
156
157 // Navigating away should clear the sign-in process.
152 GURL redirect_url("https://accounts.google.com/server-redirect?" 158 GURL redirect_url("https://accounts.google.com/server-redirect?"
153 "https://foo.com?service=chromiumsync"); 159 "https://foo.com?service=chromiumsync");
154 ui_test_utils::NavigateToURL(browser(), redirect_url); 160 ui_test_utils::NavigateToURL(browser(), redirect_url);
155 EXPECT_FALSE(signin->HasSigninProcess()); 161 EXPECT_FALSE(signin->HasSigninProcess());
156 } 162 }
157 163
158 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_ 164 #endif // CHROME_BROWSER_SIGNIN_SIGNIN_BROWSERTEST_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/sync/one_click_signin_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698