OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/ui/views/profiles/profile_chooser_view.h" | 5 #include "chrome/browser/ui/views/profiles/profile_chooser_view.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/path_service.h" | 8 #include "base/path_service.h" |
9 #include "base/prefs/pref_service.h" | 9 #include "base/prefs/pref_service.h" |
10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } // namespace | 97 } // namespace |
98 | 98 |
99 class ProfileChooserViewExtensionsTest : public ExtensionBrowserTest { | 99 class ProfileChooserViewExtensionsTest : public ExtensionBrowserTest { |
100 public: | 100 public: |
101 ProfileChooserViewExtensionsTest() {} | 101 ProfileChooserViewExtensionsTest() {} |
102 ~ProfileChooserViewExtensionsTest() override {} | 102 ~ProfileChooserViewExtensionsTest() override {} |
103 | 103 |
104 protected: | 104 protected: |
105 void SetUp() override { | 105 void SetUp() override { |
106 ExtensionBrowserTest::SetUp(); | 106 ExtensionBrowserTest::SetUp(); |
107 DCHECK(switches::IsNewAvatarMenu()); | |
108 DCHECK(switches::IsNewProfileManagement()); | 107 DCHECK(switches::IsNewProfileManagement()); |
109 } | 108 } |
110 | 109 |
111 void SetUpCommandLine(base::CommandLine* command_line) override { | 110 void SetUpCommandLine(base::CommandLine* command_line) override { |
112 ExtensionBrowserTest::SetUpCommandLine(command_line); | 111 ExtensionBrowserTest::SetUpCommandLine(command_line); |
113 switches::EnableNewProfileManagementForTesting(command_line); | 112 switches::EnableNewProfileManagementForTesting(command_line); |
114 } | 113 } |
115 | 114 |
116 void OpenProfileChooserView(Browser* browser){ | 115 void OpenProfileChooserView(Browser* browser){ |
117 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); | 116 BrowserView* browser_view = BrowserView::GetBrowserViewForBrowser(browser); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 EXPECT_EQ(1U, BrowserList::GetInstance(chrome::GetActiveDesktop())->size()); | 313 EXPECT_EQ(1U, BrowserList::GetInstance(chrome::GetActiveDesktop())->size()); |
315 | 314 |
316 WaitForUserManager(); | 315 WaitForUserManager(); |
317 // Assert that the first profile's extensions are not blocked. | 316 // Assert that the first profile's extensions are not blocked. |
318 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); | 317 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); |
319 ASSERT_EQ(0U, registry->blocked_extensions().size()); | 318 ASSERT_EQ(0U, registry->blocked_extensions().size()); |
320 | 319 |
321 // We need to hide the User Manager or else the process can't die. | 320 // We need to hide the User Manager or else the process can't die. |
322 UserManager::Hide(); | 321 UserManager::Hide(); |
323 } | 322 } |
OLD | NEW |