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

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

Issue 11316299: Enable web-based sign in flow by default. Can use command line argument (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix BiDi tests and indent Created 8 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/command_line.h" 5 #include "base/command_line.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/content_settings/cookie_settings.h" 7 #include "chrome/browser/content_settings/cookie_settings.h"
8 #include "chrome/browser/prefs/pref_service.h" 8 #include "chrome/browser/prefs/pref_service.h"
9 #include "chrome/browser/prefs/scoped_user_pref_update.h" 9 #include "chrome/browser/prefs/scoped_user_pref_update.h"
10 #include "chrome/browser/profiles/profile.h" 10 #include "chrome/browser/profiles/profile.h"
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 content::TestBrowserThread ui_thread_; 208 content::TestBrowserThread ui_thread_;
209 209
210 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelperTest); 210 DISALLOW_COPY_AND_ASSIGN(OneClickSigninHelperTest);
211 }; 211 };
212 212
213 OneClickSigninHelperTest::OneClickSigninHelperTest() 213 OneClickSigninHelperTest::OneClickSigninHelperTest()
214 : ui_thread_(content::BrowserThread::UI, &message_loop_) { 214 : ui_thread_(content::BrowserThread::UI, &message_loop_) {
215 } 215 }
216 216
217 void OneClickSigninHelperTest::SetUp() { 217 void OneClickSigninHelperTest::SetUp() {
218 // Make sure web flow is enabled for tests.
219 CommandLine::ForCurrentProcess()->AppendSwitch(
220 switches::kUseWebBasedSigninFlow);
221
222 TestingProfile* testing_profile = new TestingProfile(); 218 TestingProfile* testing_profile = new TestingProfile();
223 browser_context_.reset(testing_profile); 219 browser_context_.reset(testing_profile);
224 220
225 content::RenderViewHostTestHarness::SetUp(); 221 content::RenderViewHostTestHarness::SetUp();
226 } 222 }
227 223
228 void OneClickSigninHelperTest::CreateSigninManager( 224 void OneClickSigninHelperTest::CreateSigninManager(
229 bool use_incognito, 225 bool use_incognito,
230 const std::string& username) { 226 const std::string& username) {
231 TestingProfile* testing_profile = static_cast<TestingProfile*>( 227 TestingProfile* testing_profile = static_cast<TestingProfile*>(
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 valid_gaia_url_, "", &request_, io_data.get())); 649 valid_gaia_url_, "", &request_, io_data.get()));
654 } 650 }
655 651
656 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) { 652 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) {
657 AllowSigninCookies(false); 653 AllowSigninCookies(false);
658 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); 654 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false));
659 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, 655 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER,
660 OneClickSigninHelper::CanOfferOnIOThreadImpl( 656 OneClickSigninHelper::CanOfferOnIOThreadImpl(
661 valid_gaia_url_, "", &request_, io_data.get())); 657 valid_gaia_url_, "", &request_, io_data.get()));
662 } 658 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | chrome/browser/ui/webui/bidi_checker_web_ui_test.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698