| 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 12 matching lines...) Expand all Loading... |
| 23 #include "testing/gtest/include/gtest/gtest.h" | 23 #include "testing/gtest/include/gtest/gtest.h" |
| 24 #include "ui/base/l10n/l10n_util.h" | 24 #include "ui/base/l10n/l10n_util.h" |
| 25 | 25 |
| 26 using base::ASCIIToUTF16; | 26 using base::ASCIIToUTF16; |
| 27 | 27 |
| 28 namespace { | 28 namespace { |
| 29 | 29 |
| 30 class MockObserver : public AvatarMenuObserver { | 30 class MockObserver : public AvatarMenuObserver { |
| 31 public: | 31 public: |
| 32 MockObserver() : count_(0) {} | 32 MockObserver() : count_(0) {} |
| 33 virtual ~MockObserver() {} | 33 ~MockObserver() override {} |
| 34 | 34 |
| 35 virtual void OnAvatarMenuChanged( | 35 void OnAvatarMenuChanged(AvatarMenu* avatar_menu) override { ++count_; } |
| 36 AvatarMenu* avatar_menu) override { | |
| 37 ++count_; | |
| 38 } | |
| 39 | 36 |
| 40 int change_count() const { return count_; } | 37 int change_count() const { return count_; } |
| 41 | 38 |
| 42 private: | 39 private: |
| 43 int count_; | 40 int count_; |
| 44 | 41 |
| 45 DISALLOW_COPY_AND_ASSIGN(MockObserver); | 42 DISALLOW_COPY_AND_ASSIGN(MockObserver); |
| 46 }; | 43 }; |
| 47 | 44 |
| 48 class ProfileListDesktopTest : public testing::Test { | 45 class ProfileListDesktopTest : public testing::Test { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 355 base::string16 supervised_user_label = | 352 base::string16 supervised_user_label = |
| 356 l10n_util::GetStringUTF16(IDS_SUPERVISED_USER_AVATAR_LABEL); | 353 l10n_util::GetStringUTF16(IDS_SUPERVISED_USER_AVATAR_LABEL); |
| 357 const AvatarMenu::Item& item1 = model->GetItemAt(0); | 354 const AvatarMenu::Item& item1 = model->GetItemAt(0); |
| 358 EXPECT_NE(item1.sync_state, supervised_user_label); | 355 EXPECT_NE(item1.sync_state, supervised_user_label); |
| 359 | 356 |
| 360 const AvatarMenu::Item& item2 = model->GetItemAt(1); | 357 const AvatarMenu::Item& item2 = model->GetItemAt(1); |
| 361 EXPECT_EQ(item2.sync_state, supervised_user_label); | 358 EXPECT_EQ(item2.sync_state, supervised_user_label); |
| 362 } | 359 } |
| 363 | 360 |
| 364 } // namespace | 361 } // namespace |
| OLD | NEW |