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

Unified Diff: chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc

Issue 1693383003: ChromeOS cryptohome should be able to use gaia id as user identifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add missing files. Created 4 years, 10 months 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
diff --git a/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc b/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
index 14dbb66a63e6fc6ca0b1ab47a23338cf431e5c79..58897b35b00a1bfadde31e49aa3c056023febffb 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
@@ -164,22 +164,23 @@ class PlatformVerificationFlowTest : public ::testing::Test {
// that there are no calls to the attestation service. Thus, a test must
// explicitly expect these calls or the mocks will fail the test.
+ const AccountId account_id = AccountId::FromUserEmail(kTestEmail);
// Configure the mock AttestationFlow to call FakeGetCertificate.
EXPECT_CALL(mock_attestation_flow_,
GetCertificate(PROFILE_CONTENT_PROTECTION_CERTIFICATE,
- kTestEmail, kTestID, _, _))
- .WillRepeatedly(WithArgs<4>(Invoke(
- this, &PlatformVerificationFlowTest::FakeGetCertificate)));
+ account_id, kTestID, _, _))
+ .WillRepeatedly(WithArgs<4>(
+ Invoke(this, &PlatformVerificationFlowTest::FakeGetCertificate)));
// Configure the mock AsyncMethodCaller to call FakeSignChallenge.
std::string expected_key_name = std::string(kContentProtectionKeyPrefix) +
std::string(kTestID);
EXPECT_CALL(mock_async_caller_,
- TpmAttestationSignSimpleChallenge(KEY_USER, kTestEmail,
- expected_key_name,
- kTestChallenge, _))
- .WillRepeatedly(WithArgs<4>(Invoke(
- this, &PlatformVerificationFlowTest::FakeSignChallenge)));
+ TpmAttestationSignSimpleChallenge(
+ KEY_USER, cryptohome::Identification(account_id),
+ expected_key_name, kTestChallenge, _))
+ .WillRepeatedly(WithArgs<4>(
+ Invoke(this, &PlatformVerificationFlowTest::FakeSignChallenge)));
}
void FakeGetCertificate(

Powered by Google App Engine
This is Rietveld 408576698