| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/chromeos/login/user_controller.h" | 5 #include "chrome/browser/chromeos/login/user_controller.h" |
| 6 | 6 |
| 7 #include "app/l10n_util.h" | 7 #include "app/l10n_util.h" |
| 8 #include "base/utf_string_conversions.h" |
| 8 #include "chrome/browser/chromeos/login/user_manager.h" | 9 #include "chrome/browser/chromeos/login/user_manager.h" |
| 9 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 11 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 12 |
| 12 namespace chromeos { | 13 namespace chromeos { |
| 13 | 14 |
| 14 TEST(UserControllerTest, GetNameTooltip) { | 15 TEST(UserControllerTest, GetNameTooltip) { |
| 15 UserController guest_user_controller(NULL, false); | 16 UserController guest_user_controller(NULL, false); |
| 16 EXPECT_EQ(l10n_util::GetString(IDS_ADD_USER), | 17 EXPECT_EQ(UTF16ToWide(l10n_util::GetStringUTF16(IDS_ADD_USER)), |
| 17 guest_user_controller.GetNameTooltip()); | 18 guest_user_controller.GetNameTooltip()); |
| 18 | 19 |
| 19 UserController new_user_controller(NULL, true); | 20 UserController new_user_controller(NULL, true); |
| 20 EXPECT_EQ(l10n_util::GetString(IDS_GO_INCOGNITO_BUTTON), | 21 EXPECT_EQ(UTF16ToWide(l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON)), |
| 21 new_user_controller.GetNameTooltip()); | 22 new_user_controller.GetNameTooltip()); |
| 22 | 23 |
| 23 UserManager::User existing_user; | 24 UserManager::User existing_user; |
| 24 existing_user.set_email("someordinaryuser@domain.com"); | 25 existing_user.set_email("someordinaryuser@domain.com"); |
| 25 UserController existing_user_controller(NULL, existing_user); | 26 UserController existing_user_controller(NULL, existing_user); |
| 26 EXPECT_EQ(L"someordinaryuser (domain.com)", | 27 EXPECT_EQ(L"someordinaryuser (domain.com)", |
| 27 existing_user_controller.GetNameTooltip()); | 28 existing_user_controller.GetNameTooltip()); |
| 28 } | 29 } |
| 29 | 30 |
| 30 } // namespace chromeos | 31 } // namespace chromeos |
| OLD | NEW |