Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / views / profiles / profile_chooser_view_browsertest.cc
index ce4fec8..bc6b026 100644 (file)
@@ -8,6 +8,7 @@
 #include "base/path_service.h"
 #include "base/prefs/pref_service.h"
 #include "base/strings/utf_string_conversions.h"
+#include "base/test/histogram_tester.h"
 #include "chrome/browser/chrome_notification_types.h"
 #include "chrome/browser/profiles/profile_manager.h"
 #include "chrome/browser/profiles/profile_metrics.h"
@@ -25,7 +26,6 @@
 #include "chrome/test/base/test_switches.h"
 #include "chrome/test/base/testing_browser_process.h"
 #include "chrome/test/base/testing_profile_manager.h"
-#include "chrome/test/base/uma_histogram_helper.h"
 #include "components/signin/core/common/profile_management_switches.h"
 #include "content/public/test/test_utils.h"
 #include "ui/views/controls/button/label_button.h"
@@ -83,9 +83,8 @@ void ProfileChooserViewBrowserTest::OpenProfileChooserView() {
 #define MAYBE_ViewProfileUMA ViewProfileUMA
 #endif
 
-// TODO(mlerman): Re-enable the test to MAYBE_ViewProfileUMA once there is a
-// launch plan for EnableAccountConsistency.
-IN_PROC_BROWSER_TEST_F(ProfileChooserViewBrowserTest, DISABLED_ViewProfileUMA) {
+IN_PROC_BROWSER_TEST_F(ProfileChooserViewBrowserTest, MAYBE_ViewProfileUMA) {
+  base::HistogramTester histograms;
   // If multiprofile mode is not enabled, you can't switch between profiles.
   if (!profiles::IsMultipleProfilesEnabled())
     return;
@@ -94,4 +93,7 @@ IN_PROC_BROWSER_TEST_F(ProfileChooserViewBrowserTest, DISABLED_ViewProfileUMA) {
   profile->GetPrefs()->SetInteger(prefs::kProfileAvatarTutorialShown, 0);
 
   ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView());
+
+  histograms.ExpectUniqueSample("Profile.NewAvatarMenu.Upgrade",
+      ProfileMetrics::PROFILE_AVATAR_MENU_UPGRADE_VIEW, 1);
 }