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 "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 15 matching lines...) Expand all Loading... |
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 virtual ~MockObserver() {} |
34 | 34 |
35 virtual void OnAvatarMenuChanged( | 35 virtual void OnAvatarMenuChanged( |
36 AvatarMenu* avatar_menu) OVERRIDE { | 36 AvatarMenu* avatar_menu) override { |
37 ++count_; | 37 ++count_; |
38 } | 38 } |
39 | 39 |
40 int change_count() const { return count_; } | 40 int change_count() const { return count_; } |
41 | 41 |
42 private: | 42 private: |
43 int count_; | 43 int count_; |
44 | 44 |
45 DISALLOW_COPY_AND_ASSIGN(MockObserver); | 45 DISALLOW_COPY_AND_ASSIGN(MockObserver); |
46 }; | 46 }; |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
297 | 297 |
298 // Should only show avatar menu with multiple users. | 298 // Should only show avatar menu with multiple users. |
299 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); | 299 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); |
300 | 300 |
301 AddProfile(name2, false); | 301 AddProfile(name2, false); |
302 | 302 |
303 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); | 303 EXPECT_FALSE(AvatarMenu::ShouldShowAvatarMenu()); |
304 } | 304 } |
305 | 305 |
306 } // namespace chromeos | 306 } // namespace chromeos |
OLD | NEW |