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

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

Issue 737563004: Fix M39 bot compile error. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2171
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 | « no previous file | 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 std::vector<EasyUnlockScreenlockStateHandler::State> states; 755 std::vector<EasyUnlockScreenlockStateHandler::State> states;
756 states.push_back(EasyUnlockScreenlockStateHandler::STATE_NO_BLUETOOTH); 756 states.push_back(EasyUnlockScreenlockStateHandler::STATE_NO_BLUETOOTH);
757 states.push_back(EasyUnlockScreenlockStateHandler::STATE_NO_PHONE); 757 states.push_back(EasyUnlockScreenlockStateHandler::STATE_NO_PHONE);
758 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED); 758 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED);
759 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE); 759 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE);
760 states.push_back( 760 states.push_back(
761 EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED); 761 EasyUnlockScreenlockStateHandler::STATE_PHONE_NOT_AUTHENTICATED);
762 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED); 762 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_LOCKED);
763 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE); 763 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNLOCKABLE);
764 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED); 764 states.push_back(EasyUnlockScreenlockStateHandler::STATE_PHONE_UNSUPPORTED);
765 states.push_back(EasyUnlockScreenlockStateHandler::STATE_RSSI_TOO_LOW);
766 states.push_back(EasyUnlockScreenlockStateHandler::STATE_TX_POWER_TOO_HIGH);
767 states.push_back(EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED); 765 states.push_back(EasyUnlockScreenlockStateHandler::STATE_AUTHENTICATED);
768 766
769 for (size_t i = 0; i < states.size(); ++i) { 767 for (size_t i = 0; i < states.size(); ++i) {
770 state_handler_->ChangeState(states[i]); 768 state_handler_->ChangeState(states[i]);
771 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN, 769 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN,
772 lock_handler_->GetAuthType(user_email_)); 770 lock_handler_->GetAuthType(user_email_));
773 } 771 }
774 772
775 std::vector<EasyUnlockScreenlockStateHandler::HardlockState> hardlock_states; 773 std::vector<EasyUnlockScreenlockStateHandler::HardlockState> hardlock_states;
776 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_HARDLOCK); 774 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_HARDLOCK);
777 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::USER_HARDLOCK); 775 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::USER_HARDLOCK);
778 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_CHANGED); 776 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_CHANGED);
779 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_ADDED); 777 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::PAIRING_ADDED);
780 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_PAIRING); 778 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::NO_PAIRING);
781 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::LOGIN_FAILED); 779 hardlock_states.push_back(EasyUnlockScreenlockStateHandler::LOGIN_FAILED);
782 780
783 for (size_t i = 0; i < hardlock_states.size(); ++i) { 781 for (size_t i = 0; i < hardlock_states.size(); ++i) {
784 state_handler_->SetHardlockState(hardlock_states[i]); 782 state_handler_->SetHardlockState(hardlock_states[i]);
785 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN, 783 EXPECT_EQ(ScreenlockBridge::LockHandler::ONLINE_SIGN_IN,
786 lock_handler_->GetAuthType(user_email_)); 784 lock_handler_->GetAuthType(user_email_));
787 } 785 }
788 } 786 }
789 787
790 } // namespace 788 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698