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

Side by Side Diff: chrome/browser/notifications/message_center_settings_controller_unittest.cc

Issue 286933002: [cros login] Split login related classes into subfolders. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix includes in new tests Created 6 years, 7 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <string> 5 #include <string>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/notifications/message_center_settings_controller.h" 9 #include "chrome/browser/notifications/message_center_settings_controller.h"
10 #include "chrome/browser/prefs/pref_service_syncable.h" 10 #include "chrome/browser/prefs/pref_service_syncable.h"
11 #include "chrome/browser/profiles/profile_info_cache.h" 11 #include "chrome/browser/profiles/profile_info_cache.h"
12 #include "chrome/browser/profiles/profile_manager.h" 12 #include "chrome/browser/profiles/profile_manager.h"
13 #include "chrome/common/chrome_switches.h" 13 #include "chrome/common/chrome_switches.h"
14 #include "chrome/test/base/testing_browser_process.h" 14 #include "chrome/test/base/testing_browser_process.h"
15 #include "chrome/test/base/testing_profile_manager.h" 15 #include "chrome/test/base/testing_profile_manager.h"
16 #include "content/public/test/test_browser_thread_bundle.h" 16 #include "content/public/test/test_browser_thread_bundle.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
18 #include "ui/message_center/notifier_settings.h" 18 #include "ui/message_center/notifier_settings.h"
19 19
20 #if defined(OS_CHROMEOS) 20 #if defined(OS_CHROMEOS)
21 #include "chrome/browser/chromeos/login/fake_user_manager.h" 21 #include "chrome/browser/chromeos/login/users/fake_user_manager.h"
22 #endif 22 #endif
23 23
24 class MessageCenterSettingsControllerTest : public testing::Test { 24 class MessageCenterSettingsControllerTest : public testing::Test {
25 protected: 25 protected:
26 MessageCenterSettingsControllerTest() 26 MessageCenterSettingsControllerTest()
27 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) {}; 27 : testing_profile_manager_(TestingBrowserProcess::GetGlobal()) {};
28 virtual ~MessageCenterSettingsControllerTest() {}; 28 virtual ~MessageCenterSettingsControllerTest() {};
29 29
30 base::FilePath GetProfilePath(const std::string& base_name) { 30 base::FilePath GetProfilePath(const std::string& base_name) {
31 return testing_profile_manager_.profile_manager()->user_data_dir() 31 return testing_profile_manager_.profile_manager()->user_data_dir()
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 SwitchActiveUser("Profile-1"); 158 SwitchActiveUser("Profile-1");
159 EXPECT_EQ(controller()->GetNotifierGroupCount(), 1u); 159 EXPECT_EQ(controller()->GetNotifierGroupCount(), 1u);
160 EXPECT_EQ(controller()->GetNotifierGroupAt(0).name, 160 EXPECT_EQ(controller()->GetNotifierGroupAt(0).name,
161 base::UTF8ToUTF16("Profile-1")); 161 base::UTF8ToUTF16("Profile-1"));
162 EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 0u); 162 EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 0u);
163 } 163 }
164 #endif 164 #endif
165 165
166 // TODO(mukai): write a test case to reproduce the actual guest session scenario 166 // TODO(mukai): write a test case to reproduce the actual guest session scenario
167 // in ChromeOS -- no profiles in the profile_info_cache. 167 // in ChromeOS -- no profiles in the profile_info_cache.
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698