| OLD | NEW |
| 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" |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 | 46 |
| 47 void ResetController() { | 47 void ResetController() { |
| 48 controller_.reset(); | 48 controller_.reset(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 MessageCenterSettingsController* controller() { return controller_.get(); } | 51 MessageCenterSettingsController* controller() { return controller_.get(); } |
| 52 | 52 |
| 53 private: | 53 private: |
| 54 TestingProfileManager testing_profile_manager_; | 54 TestingProfileManager testing_profile_manager_; |
| 55 scoped_ptr<MessageCenterSettingsController> controller_; | 55 scoped_ptr<MessageCenterSettingsController> controller_; |
| 56 content::TestBrowserThreadBundle thread_bundle_; |
| 56 | 57 |
| 57 DISALLOW_COPY_AND_ASSIGN(MessageCenterSettingsControllerTest); | 58 DISALLOW_COPY_AND_ASSIGN(MessageCenterSettingsControllerTest); |
| 58 }; | 59 }; |
| 59 | 60 |
| 60 #if defined(OS_CHROMEOS) | 61 #if defined(OS_CHROMEOS) |
| 61 // This value should be same as the one in fake_user_manager.cc | 62 // This value should be same as the one in fake_user_manager.cc |
| 62 static const char kUserIdHashSuffix[] = "-hash"; | 63 static const char kUserIdHashSuffix[] = "-hash"; |
| 63 | 64 |
| 64 class MessageCenterSettingsControllerChromeOSTest | 65 class MessageCenterSettingsControllerChromeOSTest |
| 65 : public MessageCenterSettingsControllerTest { | 66 : public MessageCenterSettingsControllerTest { |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 SwitchActiveUser("Profile-1"); | 155 SwitchActiveUser("Profile-1"); |
| 155 EXPECT_EQ(controller()->GetNotifierGroupCount(), 1u); | 156 EXPECT_EQ(controller()->GetNotifierGroupCount(), 1u); |
| 156 EXPECT_EQ(controller()->GetNotifierGroupAt(0).name, | 157 EXPECT_EQ(controller()->GetNotifierGroupAt(0).name, |
| 157 base::UTF8ToUTF16("Profile-1")); | 158 base::UTF8ToUTF16("Profile-1")); |
| 158 EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 0u); | 159 EXPECT_EQ(controller()->GetNotifierGroupAt(0).index, 0u); |
| 159 } | 160 } |
| 160 #endif | 161 #endif |
| 161 | 162 |
| 162 // TODO(mukai): write a test case to reproduce the actual guest session scenario | 163 // TODO(mukai): write a test case to reproduce the actual guest session scenario |
| 163 // in ChromeOS -- no profiles in the profile_info_cache. | 164 // in ChromeOS -- no profiles in the profile_info_cache. |
| OLD | NEW |