| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "chrome/browser/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" | 5 #include "chrome/browser/extensions/api/enterprise_platform_keys_private/enterpr
ise_platform_keys_private_api.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 // Set the Enterprise install attributes. | 161 // Set the Enterprise install attributes. |
| 162 stub_install_attributes_.SetDomain("google.com"); | 162 stub_install_attributes_.SetDomain("google.com"); |
| 163 stub_install_attributes_.SetRegistrationUser("test@google.com"); | 163 stub_install_attributes_.SetRegistrationUser("test@google.com"); |
| 164 stub_install_attributes_.SetDeviceId("device_id"); | 164 stub_install_attributes_.SetDeviceId("device_id"); |
| 165 stub_install_attributes_.SetMode(policy::DEVICE_MODE_ENTERPRISE); | 165 stub_install_attributes_.SetMode(policy::DEVICE_MODE_ENTERPRISE); |
| 166 | 166 |
| 167 settings_helper_.ReplaceProvider(chromeos::kDeviceAttestationEnabled); | 167 settings_helper_.ReplaceProvider(chromeos::kDeviceAttestationEnabled); |
| 168 settings_helper_.SetBoolean(chromeos::kDeviceAttestationEnabled, true); | 168 settings_helper_.SetBoolean(chromeos::kDeviceAttestationEnabled, true); |
| 169 } | 169 } |
| 170 | 170 |
| 171 virtual void SetUp() override { | 171 void SetUp() override { |
| 172 BrowserWithTestWindowTest::SetUp(); | 172 BrowserWithTestWindowTest::SetUp(); |
| 173 | 173 |
| 174 // Set the user preferences. | 174 // Set the user preferences. |
| 175 prefs_ = browser()->profile()->GetPrefs(); | 175 prefs_ = browser()->profile()->GetPrefs(); |
| 176 base::ListValue whitelist; | 176 base::ListValue whitelist; |
| 177 whitelist.AppendString(extension_->id()); | 177 whitelist.AppendString(extension_->id()); |
| 178 prefs_->Set(prefs::kAttestationExtensionWhitelist, whitelist); | 178 prefs_->Set(prefs::kAttestationExtensionWhitelist, whitelist); |
| 179 | 179 |
| 180 SetAuthenticatedUser(); | 180 SetAuthenticatedUser(); |
| 181 } | 181 } |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 515 } | 515 } |
| 516 }; | 516 }; |
| 517 | 517 |
| 518 TEST_F(EPKPChallengeUserKeyUnmanagedUserTest, UserNotManaged) { | 518 TEST_F(EPKPChallengeUserKeyUnmanagedUserTest, UserNotManaged) { |
| 519 EXPECT_EQ(EPKPChallengeKeyBase::kUserNotManaged, | 519 EXPECT_EQ(EPKPChallengeKeyBase::kUserNotManaged, |
| 520 utils::RunFunctionAndReturnError(func_.get(), kArgs, browser())); | 520 utils::RunFunctionAndReturnError(func_.get(), kArgs, browser())); |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // namespace | 523 } // namespace |
| 524 } // namespace extensions | 524 } // namespace extensions |
| OLD | NEW |