Chromium Code Reviews| 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" |
| (...skipping 14 matching lines...) Expand all Loading... | |
| 25 | 25 |
| 26 namespace policy { | 26 namespace policy { |
| 27 | 27 |
| 28 using ::testing::_; | 28 using ::testing::_; |
| 29 using ::testing::AtLeast; | 29 using ::testing::AtLeast; |
| 30 using ::testing::InSequence; | 30 using ::testing::InSequence; |
| 31 using ::testing::Mock; | 31 using ::testing::Mock; |
| 32 | 32 |
| 33 class MockCloudPolicyCache : public CloudPolicyCache { | 33 class MockCloudPolicyCache : public CloudPolicyCache { |
| 34 public: | 34 public: |
| 35 MockCloudPolicyCache(const FilePath& backing_file_path) | 35 explicit MockCloudPolicyCache(const FilePath& backing_file_path) |
|
Jakob Kummerow
2011/02/21 16:15:00
I've fixed this in my CL by now, you can remove it
gfeher
2011/02/22 15:57:29
Done.
| |
| 36 : CloudPolicyCache(backing_file_path) {} | 36 : CloudPolicyCache(backing_file_path) {} |
| 37 | 37 |
| 38 MOCK_METHOD1(SetPolicy, bool(const em::CloudPolicyResponse& policy)); | 38 MOCK_METHOD1(SetPolicy, bool(const em::CloudPolicyResponse& policy)); |
| 39 MOCK_METHOD1(SetDevicePolicy, bool(const em::DevicePolicyResponse& policy)); | 39 MOCK_METHOD1(SetDevicePolicy, bool(const em::DevicePolicyResponse& policy)); |
| 40 MOCK_METHOD0(last_policy_refresh_time, void()); | 40 MOCK_METHOD0(last_policy_refresh_time, void()); |
| 41 }; | 41 }; |
| 42 | 42 |
| 43 class MockCloudPolicyIdentityStrategy : CloudPolicyIdentityStrategy { | 43 class MockCloudPolicyIdentityStrategy : CloudPolicyIdentityStrategy { |
| 44 public: | 44 public: |
| 45 MockCloudPolicyIdentityStrategy() {} | 45 MockCloudPolicyIdentityStrategy() {} |
| (...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 385 DeviceManagementBackend::kErrorServiceManagementNotSupported)); | 385 DeviceManagementBackend::kErrorServiceManagementNotSupported)); |
| 386 // Finally, we set the client to 'unmanaged' to stop its request stream. | 386 // Finally, we set the client to 'unmanaged' to stop its request stream. |
| 387 EXPECT_CALL(*backend_, ProcessRegisterRequest(_, _, _, _)).WillOnce( | 387 EXPECT_CALL(*backend_, ProcessRegisterRequest(_, _, _, _)).WillOnce( |
| 388 MockDeviceManagementBackendFailRegister( | 388 MockDeviceManagementBackendFailRegister( |
| 389 DeviceManagementBackend::kErrorServiceManagementNotSupported)); | 389 DeviceManagementBackend::kErrorServiceManagementNotSupported)); |
| 390 } | 390 } |
| 391 SimulateSuccessfulLoginAndRunPending(); | 391 SimulateSuccessfulLoginAndRunPending(); |
| 392 } | 392 } |
| 393 #endif | 393 #endif |
| 394 } // namespace policy | 394 } // namespace policy |
| OLD | NEW |