| 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 <stdint.h> | 5 #include <stdint.h> |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 252 |
| 253 private: | 253 private: |
| 254 base::MessageLoop message_loop_; | 254 base::MessageLoop message_loop_; |
| 255 | 255 |
| 256 DISALLOW_COPY_AND_ASSIGN(SystemTPMTokenInfoGetterTest); | 256 DISALLOW_COPY_AND_ASSIGN(SystemTPMTokenInfoGetterTest); |
| 257 }; | 257 }; |
| 258 | 258 |
| 259 class UserTPMTokenInfoGetterTest : public testing::Test { | 259 class UserTPMTokenInfoGetterTest : public testing::Test { |
| 260 public: | 260 public: |
| 261 UserTPMTokenInfoGetterTest() | 261 UserTPMTokenInfoGetterTest() |
| 262 : account_id_(AccountId::FromUserEmail("user@gmail.com")) {} | 262 : account_id_(AccountId::FromUserEmail("user")) {} |
| 263 ~UserTPMTokenInfoGetterTest() override {} | 263 ~UserTPMTokenInfoGetterTest() override {} |
| 264 | 264 |
| 265 void SetUp() override { | 265 void SetUp() override { |
| 266 cryptohome_client_.reset(new TestCryptohomeClient(account_id_)); | 266 cryptohome_client_.reset(new TestCryptohomeClient(account_id_)); |
| 267 tpm_token_info_getter_ = chromeos::TPMTokenInfoGetter::CreateForUserToken( | 267 tpm_token_info_getter_ = chromeos::TPMTokenInfoGetter::CreateForUserToken( |
| 268 account_id_, cryptohome_client_.get(), | 268 account_id_, cryptohome_client_.get(), |
| 269 scoped_refptr<base::TaskRunner>(new FakeTaskRunner(&delays_))); | 269 scoped_refptr<base::TaskRunner>(new FakeTaskRunner(&delays_))); |
| 270 } | 270 } |
| 271 | 271 |
| 272 protected: | 272 protected: |
| (...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 513 EXPECT_EQ("2222", reported_info.pin); | 513 EXPECT_EQ("2222", reported_info.pin); |
| 514 EXPECT_EQ(1, reported_info.slot_id); | 514 EXPECT_EQ(1, reported_info.slot_id); |
| 515 | 515 |
| 516 const int64_t kExpectedDelays[] = {100}; | 516 const int64_t kExpectedDelays[] = {100}; |
| 517 EXPECT_EQ(std::vector<int64_t>(kExpectedDelays, | 517 EXPECT_EQ(std::vector<int64_t>(kExpectedDelays, |
| 518 kExpectedDelays + arraysize(kExpectedDelays)), | 518 kExpectedDelays + arraysize(kExpectedDelays)), |
| 519 delays_); | 519 delays_); |
| 520 } | 520 } |
| 521 | 521 |
| 522 } // namespace | 522 } // namespace |
| OLD | NEW |