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

Unified Diff: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc

Issue 12077030: Allow signin to continue even if sync is disabled by policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix windows sync integration test failure Created 7 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
diff --git a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
index 7671331b955272e7603566d3d79aeaee41afa630..2ffc9fa8e481a6d570641fb68c3d798671c01715 100644
--- a/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
+++ b/chrome/browser/ui/sync/one_click_signin_helper_unittest.cc
@@ -537,7 +537,8 @@ TEST_F(OneClickSigninHelperTest, CanOfferDisabledByPolicy) {
profile_->GetTestingPrefService()->SetManagedPref(
prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
- EXPECT_FALSE(OneClickSigninHelper::CanOffer(
+ // Should still offer even if sync is disabled by policy.
+ EXPECT_TRUE(OneClickSigninHelper::CanOffer(
web_contents(), OneClickSigninHelper::CAN_OFFER_FOR_ALL,
"user@gmail.com", NULL));
}
@@ -690,9 +691,10 @@ TEST_F(OneClickSigninHelperIOTest, CanOfferOnIOThreadDisabledByPolicy) {
valid_gaia_url_, "", &request_, io_data.get()));
// Simulate a policy disabling sync by writing kSyncManaged directly.
+ // We should still offer to sign in the browser.
profile_->GetTestingPrefService()->SetManagedPref(
prefs::kSyncManaged, base::Value::CreateBooleanValue(true));
- EXPECT_EQ(OneClickSigninHelper::DONT_OFFER,
+ EXPECT_EQ(OneClickSigninHelper::CAN_OFFER,
OneClickSigninHelper::CanOfferOnIOThreadImpl(
valid_gaia_url_, "", &request_, io_data.get()));
}
« no previous file with comments | « chrome/browser/ui/sync/one_click_signin_helper.cc ('k') | chrome/browser/ui/toolbar/wrench_menu_model.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698