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/string_util.h" | 6 #include "base/strings/string_util.h" |
7 #include "base/strings/stringprintf.h" | 7 #include "base/strings/stringprintf.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/profiles/profile_manager.h" | 9 #include "chrome/browser/profiles/profile_manager.h" |
10 #include "chrome/browser/profiles/profile_window.h" | 10 #include "chrome/browser/profiles/profile_window.h" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 #include "content/public/test/browser_test_utils.h" | 22 #include "content/public/test/browser_test_utils.h" |
23 #include "ui/base/l10n/l10n_util.h" | 23 #include "ui/base/l10n/l10n_util.h" |
24 | 24 |
25 class UserManagerUIBrowserTest : public InProcessBrowserTest, | 25 class UserManagerUIBrowserTest : public InProcessBrowserTest, |
26 public testing::WithParamInterface<bool> { | 26 public testing::WithParamInterface<bool> { |
27 public: | 27 public: |
28 UserManagerUIBrowserTest() {} | 28 UserManagerUIBrowserTest() {} |
29 | 29 |
30 protected: | 30 protected: |
31 void SetUp() override { | 31 void SetUp() override { |
32 InProcessBrowserTest::SetUp(); | 32 InProcessBrowserTest::SetUp(); |
Mike Lerman
2015/09/28 15:23:01
don't need to override SetUp() at all.
anthonyvd
2015/09/29 20:23:16
I swear I know how virtuals work even if it's not
| |
33 DCHECK(switches::IsNewAvatarMenu()); | |
34 } | |
35 | |
36 void SetUpCommandLine(base::CommandLine* command_line) override { | |
37 switches::EnableNewAvatarMenuForTesting(command_line); | |
38 } | 33 } |
39 }; | 34 }; |
40 | 35 |
41 IN_PROC_BROWSER_TEST_F(UserManagerUIBrowserTest, PageLoads) { | 36 IN_PROC_BROWSER_TEST_F(UserManagerUIBrowserTest, PageLoads) { |
42 ui_test_utils::NavigateToURL( | 37 ui_test_utils::NavigateToURL( |
43 browser(), GURL(chrome::kChromeUIUserManagerURL)); | 38 browser(), GURL(chrome::kChromeUIUserManagerURL)); |
44 content::WebContents* web_contents = | 39 content::WebContents* web_contents = |
45 browser()->tab_strip_model()->GetActiveWebContents(); | 40 browser()->tab_strip_model()->GetActiveWebContents(); |
46 | 41 |
47 base::string16 title = web_contents->GetTitle(); | 42 base::string16 title = web_contents->GetTitle(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
89 base::RunLoop().RunUntilIdle(); | 84 base::RunLoop().RunUntilIdle(); |
90 | 85 |
91 content::WebContents* about_chrome_contents = | 86 content::WebContents* about_chrome_contents = |
92 browser()->tab_strip_model()->GetActiveWebContents(); | 87 browser()->tab_strip_model()->GetActiveWebContents(); |
93 GURL current_URL = about_chrome_contents->GetVisibleURL(); | 88 GURL current_URL = about_chrome_contents->GetVisibleURL(); |
94 EXPECT_EQ(GURL(chrome::kChromeUIHelpURL), current_URL); | 89 EXPECT_EQ(GURL(chrome::kChromeUIHelpURL), current_URL); |
95 } | 90 } |
96 | 91 |
97 // TODO(mlerman): Test that unlocking a locked profile causes the extensions | 92 // TODO(mlerman): Test that unlocking a locked profile causes the extensions |
98 // service to become unblocked. | 93 // service to become unblocked. |
OLD | NEW |