Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: chrome/browser/chromeos/settings/device_settings_test_helper.h

Issue 477663004: Merged FakedDBusThreadManager with DBusThreadManager. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_
6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ 6 #define CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h" 22 #include "chrome/browser/chromeos/settings/device_settings_test_helper.h"
23 #include "chrome/browser/chromeos/settings/mock_owner_key_util.h" 23 #include "chrome/browser/chromeos/settings/mock_owner_key_util.h"
24 #include "chromeos/dbus/session_manager_client.h" 24 #include "chromeos/dbus/session_manager_client.h"
25 #include "content/public/test/test_browser_thread_bundle.h" 25 #include "content/public/test/test_browser_thread_bundle.h"
26 #include "testing/gtest/include/gtest/gtest.h" 26 #include "testing/gtest/include/gtest/gtest.h"
27 27
28 class TestingProfile; 28 class TestingProfile;
29 29
30 namespace chromeos { 30 namespace chromeos {
31 31
32 class FakeDBusThreadManager; 32 class DBusThreadManagerSetter;
33 33
34 // A helper class for tests mocking out session_manager's device settings 34 // A helper class for tests mocking out session_manager's device settings
35 // interface. The pattern is to initialize DeviceSettingsService with the helper 35 // interface. The pattern is to initialize DeviceSettingsService with the helper
36 // for the SessionManagerClient pointer. The helper records calls made by 36 // for the SessionManagerClient pointer. The helper records calls made by
37 // DeviceSettingsService. The test can then verify state, after which it should 37 // DeviceSettingsService. The test can then verify state, after which it should
38 // call one of the Flush() variants that will resume processing. 38 // call one of the Flush() variants that will resume processing.
39 class DeviceSettingsTestHelper : public SessionManagerClient { 39 class DeviceSettingsTestHelper : public SessionManagerClient {
40 public: 40 public:
41 // Wraps a device settings service instance for testing. 41 // Wraps a device settings service instance for testing.
42 DeviceSettingsTestHelper(); 42 DeviceSettingsTestHelper();
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 // Note that FakeUserManager is used by ProfileHelper, which some of the 187 // Note that FakeUserManager is used by ProfileHelper, which some of the
188 // tested classes depend on implicitly. 188 // tested classes depend on implicitly.
189 FakeUserManager* user_manager_; 189 FakeUserManager* user_manager_;
190 ScopedUserManagerEnabler user_manager_enabler_; 190 ScopedUserManagerEnabler user_manager_enabler_;
191 scoped_ptr<TestingProfile> profile_; 191 scoped_ptr<TestingProfile> profile_;
192 scoped_refptr<MockOwnerKeyUtil> owner_key_util_; 192 scoped_refptr<MockOwnerKeyUtil> owner_key_util_;
193 // Local DeviceSettingsService instance for tests. Avoid using in combination 193 // Local DeviceSettingsService instance for tests. Avoid using in combination
194 // with the global instance (DeviceSettingsService::Get()). 194 // with the global instance (DeviceSettingsService::Get()).
195 DeviceSettingsService device_settings_service_; 195 DeviceSettingsService device_settings_service_;
196 196
197 chromeos::FakeDBusThreadManager* fake_dbus_thread_manager_; 197 scoped_ptr<DBusThreadManagerSetter> dbus_setter_;
198 198
199 private: 199 private:
200 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase); 200 DISALLOW_COPY_AND_ASSIGN(DeviceSettingsTestBase);
201 }; 201 };
202 202
203 } // namespace chromeos 203 } // namespace chromeos
204 204
205 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_ 205 #endif // CHROME_BROWSER_CHROMEOS_SETTINGS_DEVICE_SETTINGS_TEST_HELPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698