Chromium Code Reviews| 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 <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/run_loop.h" | 9 #include "base/run_loop.h" |
| 10 #include "chrome/browser/chromeos/attestation/attestation_signed_data.pb.h" | 10 #include "chrome/browser/chromeos/attestation/attestation_signed_data.pb.h" |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 68 HostContentSettingsMap::RegisterProfilePrefs(pref_service_.registry()); | 68 HostContentSettingsMap::RegisterProfilePrefs(pref_service_.registry()); |
| 69 content_settings_ = new HostContentSettingsMap(&pref_service_, false); | 69 content_settings_ = new HostContentSettingsMap(&pref_service_, false); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void TearDown() { | 72 void TearDown() { |
| 73 content_settings_->ShutdownOnUIThread(); | 73 content_settings_->ShutdownOnUIThread(); |
| 74 } | 74 } |
| 75 | 75 |
| 76 void ShowConsentPrompt( | 76 void ShowConsentPrompt( |
| 77 content::WebContents* web_contents, | 77 content::WebContents* web_contents, |
| 78 const GURL& requesting_origin, | |
| 78 const PlatformVerificationFlow::Delegate::ConsentCallback& callback) | 79 const PlatformVerificationFlow::Delegate::ConsentCallback& callback) |
| 79 override { | 80 override { |
| 80 num_consent_calls_++; | 81 num_consent_calls_++; |
| 81 callback.Run(response_); | 82 callback.Run(response_); |
|
ddorwin
2015/02/05 02:23:24
Check requesting_origin.isvalid() or something lik
xhwang
2015/02/05 02:49:34
This is test code and requesting_origin is given..
ddorwin
2015/02/05 03:25:26
It would test whether it gets passed through the p
xhwang
2015/02/05 05:46:51
Acknowledged.
| |
| 82 } | 83 } |
| 83 | 84 |
| 84 PrefService* GetPrefs(content::WebContents* web_contents) override { | 85 PrefService* GetPrefs(content::WebContents* web_contents) override { |
| 85 return &pref_service_; | 86 return &pref_service_; |
| 86 } | 87 } |
| 87 | 88 |
| 88 const GURL& GetURL(content::WebContents* web_contents) override { | 89 const GURL& GetURL(content::WebContents* web_contents) override { |
| 89 return url_; | 90 return url_; |
| 90 } | 91 } |
| 91 | 92 |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 480 fake_delegate_.set_response(PlatformVerificationFlow::CONSENT_RESPONSE_DENY); | 481 fake_delegate_.set_response(PlatformVerificationFlow::CONSENT_RESPONSE_DENY); |
| 481 fake_cryptohome_client_.set_attestation_enrolled(false); | 482 fake_cryptohome_client_.set_attestation_enrolled(false); |
| 482 fake_cryptohome_client_.set_attestation_prepared(false); | 483 fake_cryptohome_client_.set_attestation_prepared(false); |
| 483 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_); | 484 verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_); |
| 484 base::RunLoop().RunUntilIdle(); | 485 base::RunLoop().RunUntilIdle(); |
| 485 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_); | 486 EXPECT_EQ(PlatformVerificationFlow::PLATFORM_NOT_VERIFIED, result_); |
| 486 } | 487 } |
| 487 | 488 |
| 488 } // namespace attestation | 489 } // namespace attestation |
| 489 } // namespace chromeos | 490 } // namespace chromeos |
| OLD | NEW |