Chromium Code Reviews| Index: chrome/browser/policy/device_management_policy_provider_unittest.cc |
| diff --git a/chrome/browser/policy/device_management_policy_provider_unittest.cc b/chrome/browser/policy/device_management_policy_provider_unittest.cc |
| index 903db44a296e296530e5194f6469a5f7dc9ef55e..f92a805507bdf59848811386eabfb33942da0e63 100644 |
| --- a/chrome/browser/policy/device_management_policy_provider_unittest.cc |
| +++ b/chrome/browser/policy/device_management_policy_provider_unittest.cc |
| @@ -13,10 +13,13 @@ |
| #include "chrome/common/net/gaia/gaia_constants.h" |
| #include "chrome/common/notification_service.h" |
| #include "chrome/common/policy_constants.h" |
| -#include "chrome/test/device_management_test_util.h" |
| #include "chrome/test/mock_notification_observer.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| +namespace { |
| +const char kTestToken[] = "device_policy_provider_test_auth_token"; |
|
Nico
2010/11/18 13:53:40
const things implicitly have internal linkage, no
Mattias Nissler (ping if slow)
2010/11/18 14:20:15
Done.
|
| +} |
| + |
| namespace policy { |
| using ::testing::_; |
| @@ -42,16 +45,19 @@ class DeviceManagementPolicyProviderTest : public testing::Test { |
| } |
| void CreateNewProvider() { |
| + token_service_.reset(new TokenService); |
| provider_.reset(new DeviceManagementPolicyProvider( |
| ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList(), |
| backend_, |
| + token_service_.get(), |
| storage_dir_.path())); |
| loop_.RunAllPending(); |
| } |
| void SimulateSuccessfulLoginAndRunPending() { |
| loop_.RunAllPending(); |
| - SimulateSuccessfulLogin(); |
| + token_service_->IssueAuthTokenForTest( |
| + GaiaConstants::kDeviceManagementService, kTestToken); |
| loop_.RunAllPending(); |
| } |
| @@ -81,6 +87,7 @@ class DeviceManagementPolicyProviderTest : public testing::Test { |
| BrowserThread ui_thread_; |
| BrowserThread file_thread_; |
| ScopedTempDir storage_dir_; |
| + scoped_ptr<TokenService> token_service_; |
| DISALLOW_COPY_AND_ASSIGN(DeviceManagementPolicyProviderTest); |
| }; |