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

Unified Diff: chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_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/enterprise_platform_keys_api_unittest.cc
diff --git a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
index 01e847957bbc9a9f2e7b1e28702bb70d5847b2dd..4a71583f67a7c70da3e747aa06693e467f7aacde 100644
--- a/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
+++ b/chrome/browser/extensions/api/enterprise_platform_keys/enterprise_platform_keys_api_unittest.cc
@@ -161,11 +161,7 @@ class EPKChallengeKeyTestBase : 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);
@@ -277,7 +273,7 @@ class EPKChallengeMachineKeyTest : public EPKChallengeKeyTestBase {
};
TEST_F(EPKChallengeMachineKeyTest, NonEnterpriseDevice) {
- stub_install_attributes_.SetRegistrationUser("");
+ stub_install_attributes_.SetConsumer();
EXPECT_EQ(EPKPChallengeMachineKey::kNonEnterpriseDeviceError,
RunFunctionAndReturnError(func_.get(), CreateArgs(), browser()));
@@ -496,7 +492,7 @@ TEST_F(EPKChallengeUserKeyTest, KeyNotRegistered) {
}
TEST_F(EPKChallengeUserKeyTest, 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