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

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

Issue 11494003: Enable "Let me choose what to sync" checkbox in gaia sign in page. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased, and adjusted gaia URL 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 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 } 520 }
521 521
522 // Should not crash if a helper instance is not associated with an incognito 522 // Should not crash if a helper instance is not associated with an incognito
523 // web contents. 523 // web contents.
524 TEST_F(OneClickSigninHelperTest, ShowInfoBarUIThreadIncognito) { 524 TEST_F(OneClickSigninHelperTest, ShowInfoBarUIThreadIncognito) {
525 CreateSigninManager(true, ""); 525 CreateSigninManager(true, "");
526 OneClickSigninHelper* helper = 526 OneClickSigninHelper* helper =
527 OneClickSigninHelper::FromWebContents(web_contents()); 527 OneClickSigninHelper::FromWebContents(web_contents());
528 EXPECT_EQ(NULL, helper); 528 EXPECT_EQ(NULL, helper);
529 529
530 OneClickSigninHelper::ShowInfoBarUIThread("session_index", "email", 530 OneClickSigninHelper::ShowInfoBarUIThread(
531 OneClickSigninHelper::AUTO_ACCEPT, 531 "session_index", "email", OneClickSigninHelper::AUTO_ACCEPT_ACCEPTED,
532 SyncPromoUI::SOURCE_UNKNOWN, 532 SyncPromoUI::SOURCE_UNKNOWN, GURL(), process()->GetID(),
533 process()->GetID(), 533 rvh()->GetRoutingID());
534 rvh()->GetRoutingID());
535 } 534 }
536 535
537 // I/O thread tests 536 // I/O thread tests
538 537
539 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThread) { 538 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThread) {
540 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); 539 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false));
541 OneClickSigninHelper::Offer expected = 540 OneClickSigninHelper::Offer expected =
542 SyncPromoUI::UseWebBasedSigninFlow() ? OneClickSigninHelper::CAN_OFFER : 541 SyncPromoUI::UseWebBasedSigninFlow() ? OneClickSigninHelper::CAN_OFFER :
543 OneClickSigninHelper::DONT_OFFER; 542 OneClickSigninHelper::DONT_OFFER;
544 543
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
665 valid_gaia_url_, "", &request_, io_data.get())); 664 valid_gaia_url_, "", &request_, io_data.get()));
666 } 665 }
667 666
668 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) { 667 TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadNoSigninCookies) {
669 AllowSigninCookies(false); 668 AllowSigninCookies(false);
670 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false)); 669 scoped_ptr<TestProfileIOData> io_data(CreateTestProfileIOData(false));
671 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER, 670 EXPECT_EQ(OneClickSigninHelper::DONT_OFFER,
672 OneClickSigninHelper::CanOfferOnIOThreadImpl( 671 OneClickSigninHelper::CanOfferOnIOThreadImpl(
673 valid_gaia_url_, "", &request_, io_data.get())); 672 valid_gaia_url_, "", &request_, io_data.get()));
674 } 673 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | chrome/browser/ui/webui/sync_promo/sync_promo_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698