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

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

Issue 979273003: Simplify PlatformVerificationFlow::CheckConsent() logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 36a818195c120651d0d6d7e737a63321c54d1089..d23d208c46568a3129dbb201bfe1f7b5be716307 100644
--- a/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
+++ b/chrome/browser/chromeos/attestation/platform_verification_flow_unittest.cc
@@ -207,9 +207,8 @@ class PlatformVerificationFlowTest : public ::testing::Test {
cros_settings->SetBoolean(kAttestationForContentProtectionEnabled, true);
// Start with the first-time setting set since most tests want this.
- fake_delegate_.pref_service().SetUserPref(prefs::kRAConsentFirstTime,
+ fake_delegate_.pref_service().SetUserPref(prefs::kRAConsentGranted,
new base::FundamentalValue(true));
-
}
void TearDown() {
@@ -332,22 +331,9 @@ TEST_F(PlatformVerificationFlowTest, SuccessNoConsent) {
EXPECT_EQ(0, fake_delegate_.num_consent_calls());
}
-TEST_F(PlatformVerificationFlowTest, SuccessWithAttestationConsent) {
- SetUserConsent(GURL(kTestURL), true);
- fake_cryptohome_client_.set_attestation_enrolled(false);
- ExpectAttestationFlow();
- verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_);
- base::RunLoop().RunUntilIdle();
- EXPECT_EQ(PlatformVerificationFlow::SUCCESS, result_);
- EXPECT_EQ(kTestSignedData, challenge_salt_);
- EXPECT_EQ(kTestSignature, challenge_signature_);
- EXPECT_EQ(kTestCertificate, certificate_);
- EXPECT_EQ(1, fake_delegate_.num_consent_calls());
-}
-
-TEST_F(PlatformVerificationFlowTest, SuccessWithFirstTimeConsent) {
+TEST_F(PlatformVerificationFlowTest, SuccessWithConsent) {
SetUserConsent(GURL(kTestURL), true);
- fake_delegate_.pref_service().SetUserPref(prefs::kRAConsentFirstTime,
+ fake_delegate_.pref_service().SetUserPref(prefs::kRAConsentGranted,
new base::FundamentalValue(false));
ExpectAttestationFlow();
verifier_->ChallengePlatformKey(NULL, kTestID, kTestChallenge, callback_);

Powered by Google App Engine
This is Rietveld 408576698