OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/strings/stringprintf.h" | 6 #include "base/strings/stringprintf.h" |
7 #include "base/strings/utf_string_conversions.h" | 7 #include "base/strings/utf_string_conversions.h" |
8 #include "chrome/browser/profiles/profile_manager.h" | 8 #include "chrome/browser/profiles/profile_manager.h" |
9 #include "chrome/browser/profiles/profile_window.h" | 9 #include "chrome/browser/profiles/profile_window.h" |
10 #include "chrome/browser/profiles/profiles_state.h" | 10 #include "chrome/browser/profiles/profiles_state.h" |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
68 } | 68 } |
69 | 69 |
70 IN_PROC_BROWSER_TEST_F(UserManagerUIBrowserTest, PageRedirectsToAboutChrome) { | 70 IN_PROC_BROWSER_TEST_F(UserManagerUIBrowserTest, PageRedirectsToAboutChrome) { |
71 std::string user_manager_url = chrome::kChromeUIUserManagerURL; | 71 std::string user_manager_url = chrome::kChromeUIUserManagerURL; |
72 user_manager_url += profiles::kUserManagerSelectProfileAboutChrome; | 72 user_manager_url += profiles::kUserManagerSelectProfileAboutChrome; |
73 | 73 |
74 ui_test_utils::NavigateToURL(browser(), GURL(user_manager_url)); | 74 ui_test_utils::NavigateToURL(browser(), GURL(user_manager_url)); |
75 content::WebContents* web_contents = | 75 content::WebContents* web_contents = |
76 browser()->tab_strip_model()->GetActiveWebContents(); | 76 browser()->tab_strip_model()->GetActiveWebContents(); |
77 | 77 |
78 base::string16 profile_name = | 78 base::string16 profile_name = |
Mike Lerman
2015/01/14 01:53:17
You can remove this variable - it's not being used
noms (inactive)
2015/01/14 15:17:55
Done.
| |
79 profiles::GetAvatarNameForProfile(browser()->profile()->GetPath()); | 79 profiles::GetAvatarNameForProfile(browser()->profile()->GetPath()); |
80 | 80 |
81 std::string launch_js = | 81 std::string launch_js = |
82 base::StringPrintf("Oobe.launchUser('', '%s')", | 82 base::StringPrintf("Oobe.launchUser('', '%s')", |
83 base::UTF16ToUTF8(profile_name).c_str()); | 83 browser()->profile()->GetPath().MaybeAsASCII()); |
84 bool result = content::ExecuteScript(web_contents, launch_js); | 84 bool result = content::ExecuteScript(web_contents, launch_js); |
85 EXPECT_TRUE(result); | 85 EXPECT_TRUE(result); |
86 base::RunLoop().RunUntilIdle(); | 86 base::RunLoop().RunUntilIdle(); |
87 | 87 |
88 content::WebContents* about_chrome_contents = | 88 content::WebContents* about_chrome_contents = |
89 browser()->tab_strip_model()->GetActiveWebContents(); | 89 browser()->tab_strip_model()->GetActiveWebContents(); |
90 GURL current_URL = about_chrome_contents->GetVisibleURL(); | 90 GURL current_URL = about_chrome_contents->GetVisibleURL(); |
91 EXPECT_EQ(GURL(chrome::kChromeUIUberURL), current_URL); | 91 EXPECT_EQ(GURL(chrome::kChromeUIUberURL), current_URL); |
92 } | 92 } |
93 | 93 |
94 // TODO(mlerman): Test that unlocking a locked profile causes the extensions | 94 // TODO(mlerman): Test that unlocking a locked profile causes the extensions |
95 // service to become unblocked. | 95 // service to become unblocked. |
OLD | NEW |