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

Side by Side Diff: chrome/browser/profiles/avatar_menu_model_unittest.cc

Issue 11759019: Update other unittests to use newly added TestingBrowserProcess::GetGlobal(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 months 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
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/avatar_menu_model.h" 5 #include "chrome/browser/profiles/avatar_menu_model.h"
6 6
7 #include "base/string16.h" 7 #include "base/string16.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/profiles/avatar_menu_model_observer.h" 9 #include "chrome/browser/profiles/avatar_menu_model_observer.h"
10 #include "chrome/browser/profiles/profile_info_cache.h" 10 #include "chrome/browser/profiles/profile_info_cache.h"
(...skipping 15 matching lines...) Expand all
26 26
27 int change_count() { return count_; } 27 int change_count() { return count_; }
28 28
29 private: 29 private:
30 int count_; 30 int count_;
31 }; 31 };
32 32
33 class AvatarMenuModelTest : public testing::Test { 33 class AvatarMenuModelTest : public testing::Test {
34 public: 34 public:
35 AvatarMenuModelTest() 35 AvatarMenuModelTest()
36 : manager_(static_cast<TestingBrowserProcess*>(g_browser_process)) { 36 : manager_(TestingBrowserProcess::GetGlobal()) {
37 } 37 }
38 38
39 virtual void SetUp() { 39 virtual void SetUp() {
40 ASSERT_TRUE(manager_.SetUp()); 40 ASSERT_TRUE(manager_.SetUp());
41 #if defined(OS_CHROMEOS) 41 #if defined(OS_CHROMEOS)
42 // AvatarMenu and multiple profiles works after user logged in. 42 // AvatarMenu and multiple profiles works after user logged in.
43 manager_.SetLoggedIn(true); 43 manager_.SetLoggedIn(true);
44 #endif 44 #endif
45 } 45 }
46 46
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 const AvatarMenuModel::Item& item2 = model.GetItemAt(1); 158 const AvatarMenuModel::Item& item2 = model.GetItemAt(1);
159 EXPECT_EQ(1U, item2.model_index); 159 EXPECT_EQ(1U, item2.model_index);
160 EXPECT_EQ(name2, item2.name); 160 EXPECT_EQ(name2, item2.name);
161 161
162 const AvatarMenuModel::Item& item3 = model.GetItemAt(2); 162 const AvatarMenuModel::Item& item3 = model.GetItemAt(2);
163 EXPECT_EQ(2U, item3.model_index); 163 EXPECT_EQ(2U, item3.model_index);
164 EXPECT_EQ(name3, item3.name); 164 EXPECT_EQ(name3, item3.name);
165 } 165 }
166 166
167 } // namespace 167 } // namespace
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698