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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_IOS) | 76 #if defined(OS_CHROMEOS) || defined(OS_ANDROID) || defined(OS_IOS) |
77 // This test doesn't make sense for ChromeOS since it has a different | 77 // This test doesn't make sense for ChromeOS since it has a different |
78 // multi-profiles menu in the system tray instead. | 78 // multi-profiles menu in the system tray instead. |
79 // | 79 // |
80 // Mobile platforms are also excluded due to a lack of avatar menu. | 80 // Mobile platforms are also excluded due to a lack of avatar menu. |
81 #define MAYBE_ViewProfileUMA DISABLED_ViewProfileUMA | 81 #define MAYBE_ViewProfileUMA DISABLED_ViewProfileUMA |
82 #else | 82 #else |
83 #define MAYBE_ViewProfileUMA ViewProfileUMA | 83 #define MAYBE_ViewProfileUMA ViewProfileUMA |
84 #endif | 84 #endif |
85 | 85 |
86 // TODO(mlerman): Re-enable the test to MAYBE_ViewProfileUMA once there is a | 86 IN_PROC_BROWSER_TEST_F(ProfileChooserViewBrowserTest, MAYBE_ViewProfileUMA) { |
87 // launch plan for EnableAccountConsistency. | 87 base::HistogramTester histograms; |
88 IN_PROC_BROWSER_TEST_F(ProfileChooserViewBrowserTest, DISABLED_ViewProfileUMA) { | 88 // If multiprofile mode is not enabled, you can't switch between profiles. |
89 if (!profiles::IsMultipleProfilesEnabled()) | 89 if (!profiles::IsMultipleProfilesEnabled()) |
90 return; | 90 return; |
91 | 91 |
92 Profile* profile = browser()->profile(); | 92 Profile* profile = browser()->profile(); |
93 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarTutorialShown, 0); | 93 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarTutorialShown, 0); |
94 | 94 |
95 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView()); | 95 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView()); |
| 96 |
| 97 histograms.ExpectUniqueSample("Profile.NewAvatarMenu.Upgrade", |
| 98 ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_VIEW, 1); |
96 } | 99 } |
OLD | NEW |