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

Unified Diff: chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc

Issue 2403053003: Remove unused email from install attributes and add support for AD. (Closed)
Patch Set: Address Maksim's comments. Created 4 years, 2 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/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc
index b3c78fbe3cad812e6d04b8dd22f9d4ecad03e74b..6d9e2699010fe2f597e16acfe2792b853631f8bf 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys_private/enterprise_platform_keys_private_api_unittest.cc
@@ -170,11 +170,7 @@ class EPKPChallengeKeyTestBase : public BrowserWithTestWindowTest {
ON_CALL(mock_attestation_flow_, GetCertificate(_, _, _, _, _))
.WillByDefault(Invoke(GetCertificateCallbackTrue));
- // Set the Enterprise install attributes.
- stub_install_attributes_.SetDomain("google.com");
- stub_install_attributes_.SetRegistrationUser(kUserEmail);
- stub_install_attributes_.SetDeviceId("device_id");
- stub_install_attributes_.SetMode(policy::DEVICE_MODE_ENTERPRISE);
+ stub_install_attributes_.SetEnterprise("google.com", "device_id");
settings_helper_.ReplaceProvider(chromeos::kDeviceAttestationEnabled);
settings_helper_.SetBoolean(chromeos::kDeviceAttestationEnabled, true);
@@ -262,7 +258,7 @@ TEST_F(EPKPChallengeMachineKeyTest, ChallengeBadBase64) {
}
TEST_F(EPKPChallengeMachineKeyTest, NonEnterpriseDevice) {
- stub_install_attributes_.SetRegistrationUser("");
+ stub_install_attributes_.SetConsumer();
EXPECT_EQ(EPKPChallengeMachineKey::kNonEnterpriseDeviceError,
utils::RunFunctionAndReturnError(func_.get(), kArgs, browser()));
@@ -477,7 +473,7 @@ TEST_F(EPKPChallengeUserKeyTest, KeyNotRegistered) {
}
TEST_F(EPKPChallengeUserKeyTest, PersonalDevice) {
- stub_install_attributes_.SetRegistrationUser("");
+ stub_install_attributes_.SetConsumer();
// Currently personal devices are not supported.
EXPECT_EQ(GetCertificateError(kUserRejected),

Powered by Google App Engine
This is Rietveld 408576698