OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <stddef.h> |
| 6 |
5 #include <algorithm> | 7 #include <algorithm> |
6 #include <string> | 8 #include <string> |
7 | 9 |
8 #include "base/bind.h" | 10 #include "base/bind.h" |
| 11 #include "base/macros.h" |
9 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
10 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
11 #include "chrome/browser/chromeos/attestation/attestation_signed_data.pb.h" | 14 #include "chrome/browser/chromeos/attestation/attestation_signed_data.pb.h" |
12 #include "chrome/browser/chromeos/attestation/fake_certificate.h" | 15 #include "chrome/browser/chromeos/attestation/fake_certificate.h" |
13 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h" | 16 #include "chrome/browser/chromeos/attestation/platform_verification_flow.h" |
14 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" | 17 #include "chrome/browser/chromeos/login/users/mock_user_manager.h" |
15 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" | 18 #include "chrome/browser/chromeos/settings/scoped_cros_settings_test_helper.h" |
16 #include "chrome/browser/profiles/profile_impl.h" | 19 #include "chrome/browser/profiles/profile_impl.h" |
17 #include "chrome/common/pref_names.h" | 20 #include "chrome/common/pref_names.h" |
18 #include "chromeos/attestation/mock_attestation_flow.h" | 21 #include "chromeos/attestation/mock_attestation_flow.h" |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
399 TEST_F(PlatformVerificationFlowTest, AttestationNotPrepared) { | 402 TEST_F(PlatformVerificationFlowTest, AttestationNotPrepared) { |
400 fake_cryptohome_client_.set_attestation_enrolled(false); | 403 fake_cryptohome_client_.set_attestation_enrolled(false); |
401 fake_cryptohome_client_.set_attestation_prepared(false); | 404 fake_cryptohome_client_.set_attestation_prepared(false); |
402 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_); | 405 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_); |
403 base::RunLoop().RunUntilIdle(); | 406 base::RunLoop().RunUntilIdle(); |
404 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_); | 407 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_); |
405 } | 408 } |
406 | 409 |
407 } // namespace attestation | 410 } // namespace attestation |
408 } // namespace chromeos | 411 } // namespace chromeos |
OLD | NEW |