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

Unified Diff: chrome/browser/profiles/profile_manager_browsertest.cc

Issue 204123002: cros: Don't prefix test user profile. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix tests and session log dir Created 6 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/profiles/profile_manager_browsertest.cc
diff --git a/chrome/browser/profiles/profile_manager_browsertest.cc b/chrome/browser/profiles/profile_manager_browsertest.cc
index ce258ecba9df4fa47e1fa94b015c4ca45b76ef18..def46bc0713846813a108a145fc3aec175b5a23d 100644
--- a/chrome/browser/profiles/profile_manager_browsertest.cc
+++ b/chrome/browser/profiles/profile_manager_browsertest.cc
@@ -26,6 +26,7 @@
#include "base/path_service.h"
#include "chrome/common/chrome_constants.h"
#include "chrome/common/chrome_paths.h"
+#include "chromeos/chromeos_switches.h"
#include "testing/gtest/include/gtest/gtest.h"
#endif
@@ -182,8 +183,13 @@ class ProfileManagerCrOSBrowserTest : public ProfileManagerBrowserTest,
public testing::WithParamInterface<bool> {
protected:
virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE {
- if (GetParam())
+ if (GetParam()) {
command_line->AppendSwitch(::switches::kMultiProfiles);
+ // Use a user hash other than the default chrome::kTestUserProfileDir
+ // so that the prefix case is tested.
+ command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile,
+ "test-user-hash");
+ }
}
};
@@ -197,11 +203,10 @@ IN_PROC_BROWSER_TEST_P(ProfileManagerCrOSBrowserTest, GetLastUsedProfile) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
if (command_line.HasSwitch(switches::kMultiProfiles)) {
- profile_path = profile_path.Append(base::FilePath(
- std::string(chrome::kProfileDirPrefix) + chrome::kTestUserProfileDir));
+ profile_path = profile_path.AppendASCII(
+ std::string(chrome::kProfileDirPrefix) + "test-user-hash");
} else {
- profile_path = profile_path.Append(
- base::FilePath(chrome::kTestUserProfileDir));
+ profile_path = profile_path.AppendASCII(chrome::kTestUserProfileDir);
}
EXPECT_EQ(profile_path.value(), last_used_profile->GetPath().value());
}
« no previous file with comments | « chrome/browser/chromeos/profiles/profile_helper.cc ('k') | chrome/browser/ui/prefs/prefs_tab_helper_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698