| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/chromeos/settings/device_settings_service.h" | 5 #include "chrome/browser/chromeos/settings/device_settings_service.h" |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/bind.h" | 8 #include "base/bind.h" |
| 9 #include "base/bind_helpers.h" | 9 #include "base/bind_helpers.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 namespace chromeos { | 26 namespace chromeos { |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 class MockDeviceSettingsObserver : public DeviceSettingsService::Observer { | 30 class MockDeviceSettingsObserver : public DeviceSettingsService::Observer { |
| 31 public: | 31 public: |
| 32 virtual ~MockDeviceSettingsObserver() {} | 32 virtual ~MockDeviceSettingsObserver() {} |
| 33 | 33 |
| 34 MOCK_METHOD0(OwnershipStatusChanged, void()); | 34 MOCK_METHOD0(OwnershipStatusChanged, void()); |
| 35 MOCK_METHOD0(DeviceSettingsUpdated, void()); | 35 MOCK_METHOD0(DeviceSettingsUpdated, void()); |
| 36 MOCK_METHOD0(OnDeviceSettingsServiceShutdown, void()); |
| 36 }; | 37 }; |
| 37 | 38 |
| 38 } // namespace | 39 } // namespace |
| 39 | 40 |
| 40 class DeviceSettingsServiceTest : public DeviceSettingsTestBase { | 41 class DeviceSettingsServiceTest : public DeviceSettingsTestBase { |
| 41 public: | 42 public: |
| 42 void SetOperationCompleted() { | 43 void SetOperationCompleted() { |
| 43 operation_completed_ = true; | 44 operation_completed_ = true; |
| 44 } | 45 } |
| 45 | 46 |
| (...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 EXPECT_CALL(observer_, OwnershipStatusChanged()).Times(0); | 681 EXPECT_CALL(observer_, OwnershipStatusChanged()).Times(0); |
| 681 EXPECT_CALL(observer_, DeviceSettingsUpdated()).Times(1); | 682 EXPECT_CALL(observer_, DeviceSettingsUpdated()).Times(1); |
| 682 device_settings_service_.PropertyChangeComplete(true); | 683 device_settings_service_.PropertyChangeComplete(true); |
| 683 FlushDeviceSettings(); | 684 FlushDeviceSettings(); |
| 684 Mock::VerifyAndClearExpectations(&observer_); | 685 Mock::VerifyAndClearExpectations(&observer_); |
| 685 | 686 |
| 686 device_settings_service_.RemoveObserver(&observer_); | 687 device_settings_service_.RemoveObserver(&observer_); |
| 687 } | 688 } |
| 688 | 689 |
| 689 } // namespace chromeos | 690 } // namespace chromeos |
| OLD | NEW |