Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: chrome/browser/ui/views/profiles/profile_chooser_view_browsertest.cc

Issue 2708073002: Removing pre-material design menu setting. (Closed)
Patch Set: Removing header Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 } 243 }
244 244
245 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, ViewProfileUMA) { 245 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, ViewProfileUMA) {
246 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled()); 246 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled());
247 247
248 base::HistogramTester histograms; 248 base::HistogramTester histograms;
249 Profile* profile = browser()->profile(); 249 Profile* profile = browser()->profile();
250 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarTutorialShown, 0); 250 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarTutorialShown, 0);
251 251
252 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView(browser())); 252 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView(browser()));
253
254 // The MD user menu doesn't display any upgrade toast so it doesn't log this
255 // in UMA.
256 if (!switches::IsMaterialDesignUserMenu()) {
257 histograms.ExpectUniqueSample("Profile.NewAvatarMenu.Upgrade",
258 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_VIEW, 1);
259 }
260 } 253 }
261 254
262 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, LockProfile) { 255 IN_PROC_BROWSER_TEST_F(ProfileChooserViewExtensionsTest, LockProfile) {
263 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled()); 256 ASSERT_TRUE(profiles::IsMultipleProfilesEnabled());
264 257
265 // Set up the message loop for the user manager. 258 // Set up the message loop for the user manager.
266 scoped_refptr<content::MessageLoopRunner> runner( 259 scoped_refptr<content::MessageLoopRunner> runner(
267 new content::MessageLoopRunner); 260 new content::MessageLoopRunner);
268 UserManager::AddOnUserManagerShownCallbackForTesting(runner->QuitClosure()); 261 UserManager::AddOnUserManagerShownCallbackForTesting(runner->QuitClosure());
269 262
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // Wait until the user manager is shown. 336 // Wait until the user manager is shown.
344 runner->Run(); 337 runner->Run();
345 338
346 // Assert that the first profile's extensions are not blocked. 339 // Assert that the first profile's extensions are not blocked.
347 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size()); 340 ASSERT_EQ(total_enabled_extensions, registry->enabled_extensions().size());
348 ASSERT_EQ(0U, registry->blocked_extensions().size()); 341 ASSERT_EQ(0U, registry->blocked_extensions().size());
349 342
350 // We need to hide the User Manager or else the process can't die. 343 // We need to hide the User Manager or else the process can't die.
351 UserManager::Hide(); 344 UserManager::Hide();
352 } 345 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/profiles/profile_chooser_view.cc ('k') | chrome/browser/ui/webui/signin/login_ui_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698