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

Side by Side Diff: chrome/test/base/testing_profile.h

Issue 10590004: [cros] Fake a stub user login when no --login-manager and --login-user are given. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 8 years, 5 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_TEST_BASE_TESTING_PROFILE_H_ 5 #ifndef CHROME_TEST_BASE_TESTING_PROFILE_H_
6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_ 6 #define CHROME_TEST_BASE_TESTING_PROFILE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 28 matching lines...) Expand all
39 class FaviconService; 39 class FaviconService;
40 class HostContentSettingsMap; 40 class HostContentSettingsMap;
41 class PrefService; 41 class PrefService;
42 class ProfileDependencyManager; 42 class ProfileDependencyManager;
43 class ProfileSyncService; 43 class ProfileSyncService;
44 class TemplateURLService; 44 class TemplateURLService;
45 class TestingPrefService; 45 class TestingPrefService;
46 46
47 class TestingProfile : public Profile { 47 class TestingProfile : public Profile {
48 public: 48 public:
49 // Profile directory name for the test user. This is "Default" on most
50 // platforms but must be different on ChromeOS because a logged-in user cannot
51 // use "Default" as profile directory.
52 // Browser- and UI tests should always use this to get to the user's profile
53 // directory. Unit-tests, though, should use |kInitialProfile|, which is
54 // always "Default", because they are runnining without logged-in user.
55 static const char kTestUserProfileDir[];
56
49 // Default constructor that cannot be used with multi-profiles. 57 // Default constructor that cannot be used with multi-profiles.
50 TestingProfile(); 58 TestingProfile();
51 59
52 // Multi-profile aware constructor that takes the path to a directory managed 60 // Multi-profile aware constructor that takes the path to a directory managed
53 // for this profile. This constructor is meant to be used by 61 // for this profile. This constructor is meant to be used by
54 // TestingProfileManager::CreateTestingProfile. If you need to create multi- 62 // TestingProfileManager::CreateTestingProfile. If you need to create multi-
55 // profile profiles, use that factory method instead of this directly. 63 // profile profiles, use that factory method instead of this directly.
56 // Exception: if you need to create multi-profile profiles for testing the 64 // Exception: if you need to create multi-profile profiles for testing the
57 // ProfileManager, then use the constructor below instead. 65 // ProfileManager, then use the constructor below instead.
58 explicit TestingProfile(const FilePath& path); 66 explicit TestingProfile(const FilePath& path);
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
302 // testing. 310 // testing.
303 ProfileDependencyManager* profile_dependency_manager_; 311 ProfileDependencyManager* profile_dependency_manager_;
304 312
305 scoped_ptr<content::MockResourceContext> resource_context_; 313 scoped_ptr<content::MockResourceContext> resource_context_;
306 314
307 // Weak pointer to a delegate for indicating that a profile was created. 315 // Weak pointer to a delegate for indicating that a profile was created.
308 Delegate* delegate_; 316 Delegate* delegate_;
309 }; 317 };
310 318
311 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_ 319 #endif // CHROME_TEST_BASE_TESTING_PROFILE_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc ('k') | chrome/test/base/testing_profile.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698