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

Side by Side Diff: chrome/browser/signin/easy_unlock_screenlock_state_handler_unittest.cc

Issue 749563002: easy-unlock: Do not show icon for online auth type. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « chrome/browser/signin/easy_unlock_screenlock_state_handler.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <string> 5 #include <string>
6 #include <vector> 6 #include <vector>
7 7
8 #include "base/strings/string16.h" 8 #include "base/strings/string16.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
761 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE); 761 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE);
762 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED); 762 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED);
763 states.push_back(EasyUnlockScreenlockStateHandler::STATE_RSSI_TOO_LOW); 763 states.push_back(EasyUnlockScreenlockStateHandler::STATE_RSSI_TOO_LOW);
764 states.push_back(EasyUnlockScreenlockStateHandler::STATE_TX_POWER_TOO_HIGH); 764 states.push_back(EasyUnlockScreenlockStateHandler::STATE_TX_POWER_TOO_HIGH);
765 states.push_back(EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED); 765 states.push_back(EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED);
766 766
767 for (size_t i = 0; i < states.size(); ++i) { 767 for (size_t i = 0; i < states.size(); ++i) {
768 state_handler_->ChangeState(states[i]); 768 state_handler_->ChangeState(states[i]);
769 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN, 769 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN,
770 lock_handler_->GetAuthType(user_email_)); 770 lock_handler_->GetAuthType(user_email_));
771 EXPECT_FALSE(lock_handler_->HasCustomIcon());
771 } 772 }
772 773
773 std::vector<EasyUnlockScreenlockStateHandler::HardlockState> hardlock_states; 774 std::vector<EasyUnlockScreenlockStateHandler::HardlockState> hardlock_states;
774 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_HARDLOCK); 775 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_HARDLOCK);
775 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::USER_HARDLOCK); 776 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::USER_HARDLOCK);
776 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_CHANGED); 777 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_CHANGED);
777 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_ADDED); 778 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_ADDED);
778 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_PAIRING); 779 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_PAIRING);
779 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::LOGIN_FAILED); 780 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::LOGIN_FAILED);
780 781
781 for (size_t i = 0; i < hardlock_states.size(); ++i) { 782 for (size_t i = 0; i < hardlock_states.size(); ++i) {
782 state_handler_->SetHardlockState(hardlock_states[i]); 783 state_handler_->SetHardlockState(hardlock_states[i]);
783 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN, 784 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN,
784 lock_handler_->GetAuthType(user_email_)); 785 lock_handler_->GetAuthType(user_email_));
786 EXPECT_FALSE(lock_handler_->HasCustomIcon());
785 } 787 }
786 } 788 }
787 789
788 } // namespace 790 } // namespace
OLDNEW
« 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