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

Side by Side Diff: chrome/browser/signin/signin_names_io_thread_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: simpler codez 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 "base/message_loop.h" 5 #include "base/message_loop.h"
6 #include "base/utf_string_conversions.h" 6 #include "base/utf_string_conversions.h"
7 #include "chrome/browser/profiles/profile_info_cache.h" 7 #include "chrome/browser/profiles/profile_info_cache.h"
8 #include "chrome/browser/signin/signin_manager.h" 8 #include "chrome/browser/signin/signin_manager.h"
9 #include "chrome/browser/signin/signin_names_io_thread.h" 9 #include "chrome/browser/signin/signin_names_io_thread.h"
10 #include "chrome/common/chrome_notification_types.h" 10 #include "chrome/common/chrome_notification_types.h"
(...skipping 21 matching lines...) Expand all
32 content::TestBrowserThread ui_thread_; 32 content::TestBrowserThread ui_thread_;
33 content::TestBrowserThread io_thread_; 33 content::TestBrowserThread io_thread_;
34 TestingProfileManager testing_profile_manager_; 34 TestingProfileManager testing_profile_manager_;
35 SigninNamesOnIOThread signin_names_; 35 SigninNamesOnIOThread signin_names_;
36 }; 36 };
37 37
38 SigninNamesOnIOThreadTest::SigninNamesOnIOThreadTest() 38 SigninNamesOnIOThreadTest::SigninNamesOnIOThreadTest()
39 : ui_thread_(content::BrowserThread::UI, &message_loop_), 39 : ui_thread_(content::BrowserThread::UI, &message_loop_),
40 io_thread_(content::BrowserThread::IO, &message_loop_), 40 io_thread_(content::BrowserThread::IO, &message_loop_),
41 testing_profile_manager_( 41 testing_profile_manager_(
42 static_cast<TestingBrowserProcess*>(g_browser_process)) { 42 TestingBrowserProcess::GetGlobal()) {
43 } 43 }
44 44
45 void SigninNamesOnIOThreadTest::SetUp() { 45 void SigninNamesOnIOThreadTest::SetUp() {
46 ASSERT_TRUE(testing_profile_manager_.SetUp()); 46 ASSERT_TRUE(testing_profile_manager_.SetUp());
47 } 47 }
48 48
49 void SigninNamesOnIOThreadTest::TearDown() { 49 void SigninNamesOnIOThreadTest::TearDown() {
50 signin_names_.ReleaseResourcesOnUIThread(); 50 signin_names_.ReleaseResourcesOnUIThread();
51 } 51 }
52 52
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 122
123 SigninNamesOnIOThread signin_names; 123 SigninNamesOnIOThread signin_names;
124 124
125 const SigninNamesOnIOThread::EmailSet& emails = signin_names.GetEmails(); 125 const SigninNamesOnIOThread::EmailSet& emails = signin_names.GetEmails();
126 ASSERT_EQ(2u, emails.size()); 126 ASSERT_EQ(2u, emails.size());
127 ASSERT_EQ(1u, emails.count(email1)); 127 ASSERT_EQ(1u, emails.count(email1));
128 ASSERT_EQ(1u, emails.count(email2)); 128 ASSERT_EQ(1u, emails.count(email2));
129 129
130 signin_names.ReleaseResourcesOnUIThread(); 130 signin_names.ReleaseResourcesOnUIThread();
131 } 131 }
OLDNEW
« no previous file with comments | « chrome/browser/signin/signin_manager_unittest.cc ('k') | chrome/browser/ui/bookmarks/bookmark_prompt_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698