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

Side by Side Diff: chrome/browser/chromeos/login/login_utils_browsertest.cc

Issue 13671005: Re-apply 192420: Move login switches to src/chromeos (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 23 matching lines...) Expand all
34 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h" 34 #include "chrome/browser/policy/cloud/proto/device_management_backend.pb.h"
35 #include "chrome/browser/policy/policy_service.h" 35 #include "chrome/browser/policy/policy_service.h"
36 #include "chrome/browser/profiles/profile_manager.h" 36 #include "chrome/browser/profiles/profile_manager.h"
37 #include "chrome/browser/rlz/rlz.h" 37 #include "chrome/browser/rlz/rlz.h"
38 #include "chrome/common/chrome_notification_types.h" 38 #include "chrome/common/chrome_notification_types.h"
39 #include "chrome/common/chrome_paths.h" 39 #include "chrome/common/chrome_paths.h"
40 #include "chrome/common/chrome_switches.h" 40 #include "chrome/common/chrome_switches.h"
41 #include "chrome/common/pref_names.h" 41 #include "chrome/common/pref_names.h"
42 #include "chrome/test/base/scoped_testing_local_state.h" 42 #include "chrome/test/base/scoped_testing_local_state.h"
43 #include "chrome/test/base/testing_browser_process.h" 43 #include "chrome/test/base/testing_browser_process.h"
44 #include "chromeos/chromeos_switches.h"
44 #include "chromeos/cryptohome/mock_async_method_caller.h" 45 #include "chromeos/cryptohome/mock_async_method_caller.h"
45 #include "chromeos/dbus/mock_cryptohome_client.h" 46 #include "chromeos/dbus/mock_cryptohome_client.h"
46 #include "chromeos/dbus/mock_dbus_thread_manager.h" 47 #include "chromeos/dbus/mock_dbus_thread_manager.h"
47 #include "chromeos/dbus/mock_session_manager_client.h" 48 #include "chromeos/dbus/mock_session_manager_client.h"
48 #include "chromeos/disks/disk_mount_manager.h" 49 #include "chromeos/disks/disk_mount_manager.h"
49 #include "chromeos/disks/mock_disk_mount_manager.h" 50 #include "chromeos/disks/mock_disk_mount_manager.h"
50 #include "content/public/browser/browser_thread.h" 51 #include "content/public/browser/browser_thread.h"
51 #include "content/public/test/test_browser_thread.h" 52 #include "content/public/test/test_browser_thread.h"
52 #include "content/public/test/test_utils.h" 53 #include "content/public/test/test_utils.h"
53 #include "google_apis/gaia/gaia_auth_consumer.h" 54 #include "google_apis/gaia/gaia_auth_consumer.h"
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 &fake_io_thread_completion_, 202 &fake_io_thread_completion_,
202 base::Bind(&LoginUtilsTest::DoIOWork, base::Unretained(this)))); 203 base::Bind(&LoginUtilsTest::DoIOWork, base::Unretained(this))));
203 // Map BrowserThread::IO to this loop. This allows posting to IO but nothing 204 // Map BrowserThread::IO to this loop. This allows posting to IO but nothing
204 // will be executed. 205 // will be executed.
205 io_thread_.reset( 206 io_thread_.reset(
206 new content::TestBrowserThread(BrowserThread::IO, fake_io_loop)); 207 new content::TestBrowserThread(BrowserThread::IO, fake_io_loop));
207 208
208 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir()); 209 ASSERT_TRUE(scoped_temp_dir_.CreateUniqueTempDir());
209 210
210 CommandLine* command_line = CommandLine::ForCurrentProcess(); 211 CommandLine* command_line = CommandLine::ForCurrentProcess();
211 command_line->AppendSwitchASCII(switches::kDeviceManagementUrl, kDMServer); 212 command_line->AppendSwitchASCII(
213 ::switches::kDeviceManagementUrl, kDMServer);
212 command_line->AppendSwitchASCII(switches::kLoginProfile, "user"); 214 command_line->AppendSwitchASCII(switches::kLoginProfile, "user");
213 215
214 // DBusThreadManager should be initialized before io_thread_state_, as 216 // DBusThreadManager should be initialized before io_thread_state_, as
215 // DBusThreadManager is used from chromeos::ProxyConfigServiceImpl, 217 // DBusThreadManager is used from chromeos::ProxyConfigServiceImpl,
216 // which is part of io_thread_state_. 218 // which is part of io_thread_state_.
217 DBusThreadManager::InitializeForTesting(&mock_dbus_thread_manager_); 219 DBusThreadManager::InitializeForTesting(&mock_dbus_thread_manager_);
218 220
219 ConnectivityStateHelper::InitializeForTesting( 221 ConnectivityStateHelper::InitializeForTesting(
220 &mock_connectivity_state_helper_); 222 &mock_connectivity_state_helper_);
221 223
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 } 721 }
720 722
721 INSTANTIATE_TEST_CASE_P( 723 INSTANTIATE_TEST_CASE_P(
722 LoginUtilsBlockingLoginTestInstance, 724 LoginUtilsBlockingLoginTestInstance,
723 LoginUtilsBlockingLoginTest, 725 LoginUtilsBlockingLoginTest,
724 testing::Values(0, 1, 2, 3, 4, 5)); 726 testing::Values(0, 1, 2, 3, 4, 5));
725 727
726 } // namespace 728 } // namespace
727 729
728 } 730 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/login_browsertest.cc ('k') | chrome/browser/chromeos/login/screen_locker_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698