| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |