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

Side by Side Diff: chrome/browser/chromeos/login/login_utils_browsertest.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 "chrome/browser/chromeos/login/login_utils.h" 5 #include "chrome/browser/chromeos/login/login_utils.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 // started - so this is a way to fake multiple threads on a single 130 // started - so this is a way to fake multiple threads on a single
131 // test thread). The IO thread does not get the message loop set, 131 // test thread). The IO thread does not get the message loop set,
132 // and is never started. This is necessary so that we skip various 132 // and is never started. This is necessary so that we skip various
133 // bits of initialization that get posted to the IO thread. We do 133 // bits of initialization that get posted to the IO thread. We do
134 // however, at one point in the test, temporarily set the message 134 // however, at one point in the test, temporarily set the message
135 // loop for the IO thread. 135 // loop for the IO thread.
136 LoginUtilsTest() 136 LoginUtilsTest()
137 : fake_io_thread_completion_(false, false), 137 : fake_io_thread_completion_(false, false),
138 fake_io_thread_("fake_io_thread"), 138 fake_io_thread_("fake_io_thread"),
139 loop_(MessageLoop::TYPE_IO), 139 loop_(MessageLoop::TYPE_IO),
140 browser_process_( 140 browser_process_(TestingBrowserProcess::GetGlobal()),
141 static_cast<TestingBrowserProcess*>(g_browser_process)),
142 local_state_(browser_process_), 141 local_state_(browser_process_),
143 ui_thread_(BrowserThread::UI, &loop_), 142 ui_thread_(BrowserThread::UI, &loop_),
144 db_thread_(BrowserThread::DB), 143 db_thread_(BrowserThread::DB),
145 file_thread_(BrowserThread::FILE, &loop_), 144 file_thread_(BrowserThread::FILE, &loop_),
146 mock_async_method_caller_(NULL), 145 mock_async_method_caller_(NULL),
147 connector_(NULL), 146 connector_(NULL),
148 cryptohome_(NULL), 147 cryptohome_(NULL),
149 prepared_profile_(NULL), 148 prepared_profile_(NULL),
150 created_profile_(NULL) {} 149 created_profile_(NULL) {}
151 150
(...skipping 529 matching lines...) Expand 10 before | Expand all | Expand 10 after
681 } 680 }
682 681
683 INSTANTIATE_TEST_CASE_P( 682 INSTANTIATE_TEST_CASE_P(
684 LoginUtilsBlockingLoginTestInstance, 683 LoginUtilsBlockingLoginTestInstance,
685 LoginUtilsBlockingLoginTest, 684 LoginUtilsBlockingLoginTest,
686 testing::Values(0, 1, 2, 3, 4, 5)); 685 testing::Values(0, 1, 2, 3, 4, 5));
687 686
688 } // namespace 687 } // namespace
689 688
690 } 689 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698