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

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

Issue 379283002: Rework UMAHistogramHelper and StatisticsDeltaReader into [Chrome]HistogramTester. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 6 years, 4 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 | Annotate | Revision Log
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 "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"
11 #include "base/test/histogram_tester.h"
11 #include "chrome/browser/chrome_notification_types.h" 12 #include "chrome/browser/chrome_notification_types.h"
12 #include "chrome/browser/profiles/profile_manager.h" 13 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/browser/profiles/profile_metrics.h" 14 #include "chrome/browser/profiles/profile_metrics.h"
14 #include "chrome/browser/profiles/profiles_state.h" 15 #include "chrome/browser/profiles/profiles_state.h"
15 #include "chrome/browser/ui/browser_dialogs.h" 16 #include "chrome/browser/ui/browser_dialogs.h"
16 #include "chrome/browser/ui/browser_list.h" 17 #include "chrome/browser/ui/browser_list.h"
17 #include "chrome/browser/ui/views/frame/browser_view.h" 18 #include "chrome/browser/ui/views/frame/browser_view.h"
18 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h" 19 #include "chrome/browser/ui/views/profiles/avatar_menu_button.h"
19 #include "chrome/browser/ui/views/profiles/new_avatar_button.h" 20 #include "chrome/browser/ui/views/profiles/new_avatar_button.h"
20 #include "chrome/browser/ui/views/profiles/user_manager_view.h" 21 #include "chrome/browser/ui/views/profiles/user_manager_view.h"
21 #include "chrome/common/chrome_paths.h" 22 #include "chrome/common/chrome_paths.h"
22 #include "chrome/common/chrome_switches.h" 23 #include "chrome/common/chrome_switches.h"
23 #include "chrome/common/pref_names.h" 24 #include "chrome/common/pref_names.h"
24 #include "chrome/test/base/in_process_browser_test.h" 25 #include "chrome/test/base/in_process_browser_test.h"
25 #include "chrome/test/base/test_switches.h" 26 #include "chrome/test/base/test_switches.h"
26 #include "chrome/test/base/testing_browser_process.h" 27 #include "chrome/test/base/testing_browser_process.h"
27 #include "chrome/test/base/testing_profile_manager.h" 28 #include "chrome/test/base/testing_profile_manager.h"
28 #include "chrome/test/base/uma_histogram_helper.h"
29 #include "components/signin/core/common/profile_management_switches.h" 29 #include "components/signin/core/common/profile_management_switches.h"
30 #include "content/public/test/test_utils.h" 30 #include "content/public/test/test_utils.h"
31 #include "ui/views/controls/button/label_button.h" 31 #include "ui/views/controls/button/label_button.h"
32 32
33 class ProfileChooserViewBrowserTest : public InProcessBrowserTest { 33 class ProfileChooserViewBrowserTest : public InProcessBrowserTest {
34 public: 34 public:
35 ProfileChooserViewBrowserTest(); 35 ProfileChooserViewBrowserTest();
36 virtual ~ProfileChooserViewBrowserTest(); 36 virtual ~ProfileChooserViewBrowserTest();
37 37
38 protected: 38 protected:
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // TODO(mlerman): Re-enable the test to MAYBE_ViewProfileUMA once there is a
87 // launch plan for EnableAccountConsistency. 87 // launch plan for EnableAccountConsistency.
88 IN_PROC_BROWSER_TEST_F(ProfileChooserViewBrowserTest, DISABLED_ViewProfileUMA) { 88 IN_PROC_BROWSER_TEST_F(ProfileChooserViewBrowserTest, DISABLED_ViewProfileUMA) {
89 // If multiprofile mode is not enabled, you can't switch between profiles.
90 if (!profiles::IsMultipleProfilesEnabled()) 89 if (!profiles::IsMultipleProfilesEnabled())
91 return; 90 return;
92 91
93 Profile* profile = browser()->profile(); 92 Profile* profile = browser()->profile();
94 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarTutorialShown, 0); 93 profile->GetPrefs()->SetInteger(prefs::kProfileAvatarTutorialShown, 0);
95 94
96 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView()); 95 ASSERT_NO_FATAL_FAILURE(OpenProfileChooserView());
97 } 96 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/passwords/manage_passwords_view_test.cc ('k') | chrome/chrome_tests_unit.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698