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

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

Issue 644873002: Easy Unlock Show connecting user pod icon when waking up from sleep (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 2 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
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 5eac350ff8ce3d93562ea5d96835f36eada70e9f..cfca4d6243fd3d32c4cd4da56e88840c7c445ed9 100644
--- a/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc
+++ b/chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc
@@ -266,9 +266,20 @@ TEST_F(EasyUnlockScreenlockStateHandlerTest, AuthenticatedNotInitialRun) {
EXPECT_TRUE(lock_handler_->CustomIconHardlocksOnClick());
}
+TEST_F(EasyUnlockScreenlockStateHandlerTest, IsActive) {
+ EXPECT_FALSE(state_handler_->IsActive());
+ state_handler_->ChangeState(
+ EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED);
+ EXPECT_TRUE(state_handler_->IsActive());
+ state_handler_->ChangeState(
+ EasyUnlockScreenlockStateHandler::STATE_INACTIVE);
+ EXPECT_FALSE(state_handler_->IsActive());
+}
+
TEST_F(EasyUnlockScreenlockStateHandlerTest, BluetoothConnecting) {
state_handler_->ChangeState(
EasyUnlockScreenlockStateHandler::STATE_BLUETOOTH_CONNECTING);
+ EXPECT_TRUE(state_handler_->IsActive());
EXPECT_EQ(1u, lock_handler_->GetAndResetShowIconCount());
EXPECT_EQ(ScreenlockBridge::LockHandler::OFFLINE_PASSWORD,
@@ -341,6 +352,7 @@ TEST_F(EasyUnlockScreenlockStateHandlerTest, StatesWithLockedIcon) {
for (size_t i = 0; i < states.size(); ++i) {
state_handler_->ChangeState(states[i]);
+ EXPECT_TRUE(state_handler_->IsActive());
EXPECT_EQ(1u, lock_handler_->GetAndResetShowIconCount())
<< "State: " << states[i];
« no previous file with comments | « chrome/browser/signin/easy_unlock_screenlock_state_handler.cc ('k') | chrome/browser/signin/easy_unlock_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698