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

Side by Side Diff: chrome/browser/chromeos/login/user_controller_unittest.cc

Issue 8436002: [cros] Remove Views implementation for login/OOBE. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge Created 9 years, 1 month 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
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/browser/chromeos/login/user_controller.h"
6
7 #include "base/utf_string_conversions.h"
8 #include "chrome/browser/chromeos/login/user_manager.h"
9 #include "chrome/test/base/testing_browser_process.h"
10 #include "grit/generated_resources.h"
11 #include "testing/gtest/include/gtest/gtest.h"
12 #include "ui/base/l10n/l10n_util.h"
13
14 namespace chromeos {
15
16 TEST(UserControllerTest, GetNameTooltipAddUser) {
17 UserController guest_user_controller(NULL, false);
18 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_ADD_USER),
19 guest_user_controller.GetNameTooltip());
20 }
21
22 TEST(UserControllerTest, GetNameTooltipIncognitoUser) {
23 UserController new_user_controller(NULL, true);
24 EXPECT_EQ(l10n_util::GetStringUTF16(IDS_GO_INCOGNITO_BUTTON),
25 new_user_controller.GetNameTooltip());
26 }
27
28 TEST(UserControllerTest, GetNameTooltipExistingUser) {
29 // We need to have NotificationService and g_browser_process initialized
30 // before we create UserController for existing user.
31 // Otherwise we crash with either SEGFAULT or DCHECK.
32 UserManager::User existing_user;
33 existing_user.set_email("someordinaryuser@domain.com");
34 UserController existing_user_controller(NULL, existing_user);
35 EXPECT_EQ(ASCIIToUTF16("someordinaryuser (domain.com)"),
36 existing_user_controller.GetNameTooltip());
37 }
38
39 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/user_controller_gtk.cc ('k') | chrome/browser/chromeos/login/user_image_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698