| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/profiles/profile_list_desktop.h" | 5 #include "chrome/browser/profiles/profile_list_desktop.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 | 41 |
| 42 DISALLOW_COPY_AND_ASSIGN(MockObserver); | 42 DISALLOW_COPY_AND_ASSIGN(MockObserver); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 class ProfileListDesktopTest : public testing::Test { | 45 class ProfileListDesktopTest : public testing::Test { |
| 46 public: | 46 public: |
| 47 ProfileListDesktopTest() | 47 ProfileListDesktopTest() |
| 48 : manager_(TestingBrowserProcess::GetGlobal()) { | 48 : manager_(TestingBrowserProcess::GetGlobal()) { |
| 49 } | 49 } |
| 50 | 50 |
| 51 virtual void SetUp() { | 51 void SetUp() override { |
| 52 ASSERT_TRUE(manager_.SetUp()); | 52 ASSERT_TRUE(manager_.SetUp()); |
| 53 #if defined(OS_CHROMEOS) | 53 #if defined(OS_CHROMEOS) |
| 54 // AvatarMenu and multiple profiles works after user logged in. | 54 // AvatarMenu and multiple profiles works after user logged in. |
| 55 manager_.SetLoggedIn(true); | 55 manager_.SetLoggedIn(true); |
| 56 #endif | 56 #endif |
| 57 } | 57 } |
| 58 | 58 |
| 59 AvatarMenu* GetAvatarMenu() { | 59 AvatarMenu* GetAvatarMenu() { |
| 60 // Reset the MockObserver. | 60 // Reset the MockObserver. |
| 61 mock_observer_.reset(new MockObserver()); | 61 mock_observer_.reset(new MockObserver()); |
| (...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 352 base::string16 supervised_user_label = | 352 base::string16 supervised_user_label = |
| 353 l10n_util::GetStringUTF16(IDS_SUPERVISED_USER_AVATAR_LABEL); | 353 l10n_util::GetStringUTF16(IDS_SUPERVISED_USER_AVATAR_LABEL); |
| 354 const AvatarMenu::Item& item1 = model->GetItemAt(0); | 354 const AvatarMenu::Item& item1 = model->GetItemAt(0); |
| 355 EXPECT_NE(item1.sync_state, supervised_user_label); | 355 EXPECT_NE(item1.sync_state, supervised_user_label); |
| 356 | 356 |
| 357 const AvatarMenu::Item& item2 = model->GetItemAt(1); | 357 const AvatarMenu::Item& item2 = model->GetItemAt(1); |
| 358 EXPECT_EQ(item2.sync_state, supervised_user_label); | 358 EXPECT_EQ(item2.sync_state, supervised_user_label); |
| 359 } | 359 } |
| 360 | 360 |
| 361 } // namespace | 361 } // namespace |
| OLD | NEW |