OLD | NEW |
---|---|
1 // Copyright (c) 2015 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2015 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 "chrome/browser/profiles/profile_window.h" | 5 #include "chrome/browser/profiles/profile_window.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
10 #include "chrome/browser/browser_process.h" | 10 #include "chrome/browser/browser_process.h" |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
79 } | 79 } |
80 }; | 80 }; |
81 | 81 |
82 } // namespace | 82 } // namespace |
83 | 83 |
84 class ProfileWindowBrowserTest : public InProcessBrowserTest { | 84 class ProfileWindowBrowserTest : public InProcessBrowserTest { |
85 public: | 85 public: |
86 ProfileWindowBrowserTest() {} | 86 ProfileWindowBrowserTest() {} |
87 ~ProfileWindowBrowserTest() override {} | 87 ~ProfileWindowBrowserTest() override {} |
88 | 88 |
89 void SetUpCommandLine(base::CommandLine* command_line) override { | 89 void SetUpCommandLine(base::CommandLine* command_line) override { |
Mike Lerman
2015/09/28 15:23:01
don't need to override this method anymore.
anthonyvd
2015/09/29 20:23:15
Done.
| |
90 InProcessBrowserTest::SetUpCommandLine(command_line); | 90 InProcessBrowserTest::SetUpCommandLine(command_line); |
91 switches::EnableNewAvatarMenuForTesting( | |
92 base::CommandLine::ForCurrentProcess()); | |
93 } | 91 } |
94 | 92 |
95 Browser* OpenGuestBrowser(); | 93 Browser* OpenGuestBrowser(); |
96 void CloseBrowser(Browser* browser); | 94 void CloseBrowser(Browser* browser); |
97 | 95 |
98 private: | 96 private: |
99 DISALLOW_COPY_AND_ASSIGN(ProfileWindowBrowserTest); | 97 DISALLOW_COPY_AND_ASSIGN(ProfileWindowBrowserTest); |
100 }; | 98 }; |
101 | 99 |
102 Browser* ProfileWindowBrowserTest::OpenGuestBrowser() { | 100 Browser* ProfileWindowBrowserTest::OpenGuestBrowser() { |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 WrenchMenuModel model_normal_profile(&accelerator_handler, browser()); | 206 WrenchMenuModel model_normal_profile(&accelerator_handler, browser()); |
209 EXPECT_NE(-1, model_normal_profile.GetIndexOfCommandId(IDC_BOOKMARKS_MENU)); | 207 EXPECT_NE(-1, model_normal_profile.GetIndexOfCommandId(IDC_BOOKMARKS_MENU)); |
210 | 208 |
211 // Guest browser has no bookmark menu. | 209 // Guest browser has no bookmark menu. |
212 Browser* guest_browser = OpenGuestBrowser(); | 210 Browser* guest_browser = OpenGuestBrowser(); |
213 WrenchMenuModel model_guest_profile(&accelerator_handler, guest_browser); | 211 WrenchMenuModel model_guest_profile(&accelerator_handler, guest_browser); |
214 EXPECT_EQ(-1, model_guest_profile.GetIndexOfCommandId(IDC_BOOKMARKS_MENU)); | 212 EXPECT_EQ(-1, model_guest_profile.GetIndexOfCommandId(IDC_BOOKMARKS_MENU)); |
215 } | 213 } |
216 | 214 |
217 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS) | 215 #endif // !defined(OS_CHROMEOS) && !defined(OS_ANDROID) && !defined(OS_IOS) |
OLD | NEW |