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