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

Unified Diff: chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc

Issue 572083004: Don't use opaque icons for easy unlock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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/signin/easy_unlock_screenlock_state_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc
diff --git a/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc b/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc
index 08693538a75df8bfa01537f571f5d3105c264672..d8d93dda6d3be0d647b5fe869ede298840f536bf 100644
--- a/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc
+++ b/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc
@@ -331,53 +331,7 @@ TEST_F(EasyUnlockScreenlockStateHandlerTest, BluetoothConnecting) {
EXPECT_EQ(0u, lock_handler_->GetAndResetShowIconCount());
}
-TEST_F(EasyUnlockScreenlockStateHandlerTest, PhoneLocked) {
- pref_service_->SetBoolean(prefs::kEasyUnlockShowTutorial, false);
- state_handler_->ChangeState(
- EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED);
-
- EXPECT_EQ(1u, lock_handler_->GetAndResetShowIconCount());
- EXPECT_EQ(ScreenlockBridge::LockHandler::OFFLINE_PASSWORD,
- lock_handler_->GetAuthType(user_email_));
-
- ASSERT_TRUE(lock_handler_->HasCustomIcon());
- EXPECT_EQ(kLockedIconURL, lock_handler_->GetCustomIconURL());
- EXPECT_TRUE(lock_handler_->CustomIconHasTooltip());
- EXPECT_FALSE(lock_handler_->IsCustomIconTooltipAutoshown());
- EXPECT_TRUE(lock_handler_->CustomIconHardlocksOnClick());
- EXPECT_FALSE(lock_handler_->IsCustomIconAnimated());
- EXPECT_EQ(100, lock_handler_->GetCustomIconOpacity());
-
- state_handler_->ChangeState(
- EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED);
- // Duplicated state change should be ignored.
- EXPECT_EQ(0u, lock_handler_->GetAndResetShowIconCount());
-}
-
-TEST_F(EasyUnlockScreenlockStateHandlerTest, PhoneNotAuthenticated) {
- pref_service_->SetBoolean(prefs::kEasyUnlockShowTutorial, false);
- state_handler_->ChangeState(
- EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED);
-
- EXPECT_EQ(1u, lock_handler_->GetAndResetShowIconCount());
- EXPECT_EQ(ScreenlockBridge::LockHandler::OFFLINE_PASSWORD,
- lock_handler_->GetAuthType(user_email_));
-
- ASSERT_TRUE(lock_handler_->HasCustomIcon());
- EXPECT_EQ(kLockedIconURL, lock_handler_->GetCustomIconURL());
- EXPECT_TRUE(lock_handler_->CustomIconHasTooltip());
- EXPECT_FALSE(lock_handler_->IsCustomIconTooltipAutoshown());
- EXPECT_TRUE(lock_handler_->CustomIconHardlocksOnClick());
- EXPECT_FALSE(lock_handler_->IsCustomIconAnimated());
- EXPECT_EQ(100, lock_handler_->GetCustomIconOpacity());
-
- state_handler_->ChangeState(
- EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED);
- // Duplicated state change should be ignored.
- EXPECT_EQ(0u, lock_handler_->GetAndResetShowIconCount());
-}
-
-TEST_F(EasyUnlockScreenlockStateHandlerTest, StatesWithOpaqueIcons) {
+TEST_F(EasyUnlockScreenlockStateHandlerTest, StatesWithLockedIcon) {
pref_service_->SetBoolean(prefs::kEasyUnlockShowTutorial, false);
std::vector<EasyUnlockScreenlockStateHandler::State> states;
@@ -385,6 +339,9 @@ TEST_F(EasyUnlockScreenlockStateHandlerTest, StatesWithOpaqueIcons) {
states.push_back(EasyUnlockScreenlockStateHandler::STATE_NO_PHONE);
states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED);
states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE);
+ states.push_back(
+ EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED);
+ states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED);
for (size_t i = 0; i < states.size(); ++i) {
state_handler_->ChangeState(states[i]);
@@ -407,7 +364,7 @@ TEST_F(EasyUnlockScreenlockStateHandlerTest, StatesWithOpaqueIcons) {
<< "State: " << states[i];
EXPECT_FALSE(lock_handler_->IsCustomIconAnimated())
<< "State: " << states[i];
- EXPECT_EQ(50, lock_handler_->GetCustomIconOpacity())
+ EXPECT_EQ(100, lock_handler_->GetCustomIconOpacity())
<< "State: " << states[i];
state_handler_->ChangeState(states[i]);
« no previous file with comments | « chrome/browser/signin/easy_unlock_screenlock_state_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698