Index: chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc |
diff --git a/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc b/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc |
index 1b11876e52c8e02dc6f201471de438d1daf0c70b..de7018c8f79374ccf32809e3cfc6fc5524881afe 100644 |
--- a/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc |
+++ b/chrome/browser/ui/webui/signin/user_manager_ui_browsertest.cc |
@@ -3,6 +3,7 @@ |
// found in the LICENSE file. |
#include "base/command_line.h" |
+#include "base/strings/string_util.h" |
#include "base/strings/stringprintf.h" |
#include "base/strings/utf_string_conversions.h" |
#include "chrome/browser/profiles/profile_manager.h" |
@@ -75,12 +76,14 @@ IN_PROC_BROWSER_TEST_F(UserManagerUIBrowserTest, PageRedirectsToAboutChrome) { |
content::WebContents* web_contents = |
browser()->tab_strip_model()->GetActiveWebContents(); |
- base::string16 profile_name = |
- profiles::GetAvatarNameForProfile(browser()->profile()->GetPath()); |
+ // If this is a Windows style path, escape all the slashes. |
+ std::string profile_path; |
+ base::ReplaceChars(browser()->profile()->GetPath().MaybeAsASCII(), |
+ "\\", "\\\\", &profile_path); |
std::string launch_js = |
- base::StringPrintf("Oobe.launchUser('', '%s')", |
- base::UTF16ToUTF8(profile_name).c_str()); |
+ base::StringPrintf("Oobe.launchUser('%s')", profile_path.c_str()); |
+ |
bool result = content::ExecuteScript(web_contents, launch_js); |
EXPECT_TRUE(result); |
base::RunLoop().RunUntilIdle(); |