OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "base/file_util.h" | 5 #include "base/file_util.h" |
6 #include "base/message_loop.h" | 6 #include "base/message_loop.h" |
7 #include "base/scoped_temp_dir.h" | 7 #include "base/scoped_temp_dir.h" |
8 #include "chrome/browser/browser_thread.h" | 8 #include "chrome/browser/browser_thread.h" |
9 #include "chrome/browser/net/gaia/token_service.h" | 9 #include "chrome/browser/net/gaia/token_service.h" |
10 #include "chrome/browser/policy/cloud_policy_cache.h" | 10 #include "chrome/browser/policy/cloud_policy_cache.h" |
11 #include "chrome/browser/policy/cloud_policy_controller.h" | |
11 #include "chrome/browser/policy/configuration_policy_pref_store.h" | 12 #include "chrome/browser/policy/configuration_policy_pref_store.h" |
12 #include "chrome/browser/policy/configuration_policy_provider.h" | 13 #include "chrome/browser/policy/configuration_policy_provider.h" |
13 #include "chrome/browser/policy/device_management_policy_provider.h" | |
14 #include "chrome/browser/policy/mock_configuration_policy_store.h" | 14 #include "chrome/browser/policy/mock_configuration_policy_store.h" |
15 #include "chrome/browser/policy/mock_device_management_backend.h" | 15 #include "chrome/browser/policy/mock_device_management_backend.h" |
16 #include "chrome/common/net/gaia/gaia_constants.h" | 16 #include "chrome/common/net/gaia/gaia_constants.h" |
17 #include "chrome/common/notification_observer_mock.h" | 17 #include "chrome/common/notification_observer_mock.h" |
18 #include "chrome/common/notification_service.h" | 18 #include "chrome/common/notification_service.h" |
19 #include "chrome/test/testing_device_token_fetcher.h" | |
20 #include "chrome/test/testing_profile.h" | 19 #include "chrome/test/testing_profile.h" |
21 #include "policy/policy_constants.h" | 20 #include "policy/policy_constants.h" |
22 #include "testing/gmock/include/gmock/gmock.h" | 21 #include "testing/gmock/include/gmock/gmock.h" |
23 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
24 | 23 |
24 #if 0 | |
Mattias Nissler (ping if slow)
2011/02/15 10:15:16
I think we agree this cannot go in in this state.
Jakob Kummerow
2011/02/21 12:12:15
Done.
| |
25 | |
25 const char kTestToken[] = "device_policy_provider_test_auth_token"; | 26 const char kTestToken[] = "device_policy_provider_test_auth_token"; |
26 | 27 |
27 namespace policy { | 28 namespace policy { |
28 | 29 |
29 using ::testing::_; | 30 using ::testing::_; |
30 using ::testing::AtLeast; | 31 using ::testing::AtLeast; |
31 using ::testing::InSequence; | 32 using ::testing::InSequence; |
32 using ::testing::Mock; | 33 using ::testing::Mock; |
33 | 34 |
34 class MockConfigurationPolicyObserver | 35 class MockConfigurationPolicyObserver |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
373 DeviceManagementBackend::kErrorServiceManagementNotSupported)); | 374 DeviceManagementBackend::kErrorServiceManagementNotSupported)); |
374 // Finally, we set the client to 'unmanaged' to stop its request stream. | 375 // Finally, we set the client to 'unmanaged' to stop its request stream. |
375 EXPECT_CALL(*backend_, ProcessRegisterRequest(_, _, _, _)).WillOnce( | 376 EXPECT_CALL(*backend_, ProcessRegisterRequest(_, _, _, _)).WillOnce( |
376 MockDeviceManagementBackendFailRegister( | 377 MockDeviceManagementBackendFailRegister( |
377 DeviceManagementBackend::kErrorServiceManagementNotSupported)); | 378 DeviceManagementBackend::kErrorServiceManagementNotSupported)); |
378 } | 379 } |
379 SimulateSuccessfulLoginAndRunPending(); | 380 SimulateSuccessfulLoginAndRunPending(); |
380 } | 381 } |
381 | 382 |
382 } // namespace policy | 383 } // namespace policy |
384 | |
385 #endif | |
386 | |
OLD | NEW |