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

Side by Side Diff: chrome/browser/chromeos/login/test/oobe_base_test.cc

Issue 819133004: Make callers of CommandLine use it via the base:: namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix Created 6 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/test/oobe_base_test.h" 5 #include "chrome/browser/chromeos/login/test/oobe_base_test.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/path_service.h" 9 #include "base/path_service.h"
10 #include "chrome/browser/chrome_notification_types.h" 10 #include "chrome/browser/chrome_notification_types.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 // If the login display is still showing, exit gracefully. 73 // If the login display is still showing, exit gracefully.
74 if (LoginDisplayHostImpl::default_host()) { 74 if (LoginDisplayHostImpl::default_host()) {
75 base::MessageLoop::current()->PostTask(FROM_HERE, 75 base::MessageLoop::current()->PostTask(FROM_HERE,
76 base::Bind(&chrome::AttemptExit)); 76 base::Bind(&chrome::AttemptExit));
77 content::RunMessageLoop(); 77 content::RunMessageLoop();
78 } 78 }
79 79
80 ExtensionApiTest::TearDownOnMainThread(); 80 ExtensionApiTest::TearDownOnMainThread();
81 } 81 }
82 82
83 void OobeBaseTest::SetUpCommandLine(CommandLine* command_line) { 83 void OobeBaseTest::SetUpCommandLine(base::CommandLine* command_line) {
84 ExtensionApiTest::SetUpCommandLine(command_line); 84 ExtensionApiTest::SetUpCommandLine(command_line);
85 command_line->AppendSwitch(chromeos::switches::kLoginManager); 85 command_line->AppendSwitch(chromeos::switches::kLoginManager);
86 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); 86 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
87 if (!needs_background_networking_) 87 if (!needs_background_networking_)
88 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking); 88 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking);
89 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); 89 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
90 90
91 // Create gaia and webstore URL from test server url but using different 91 // Create gaia and webstore URL from test server url but using different
92 // host names. This is to avoid gaia response being tagged as from 92 // host names. This is to avoid gaia response being tagged as from
93 // webstore in chrome_resource_dispatcher_host_delegate.cc. 93 // webstore in chrome_resource_dispatcher_host_delegate.cc.
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() { 164 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() {
165 ExistingUserController* controller = 165 ExistingUserController* controller =
166 ExistingUserController::current_controller(); 166 ExistingUserController::current_controller();
167 CHECK(controller); 167 CHECK(controller);
168 return static_cast<WebUILoginDisplay*>( 168 return static_cast<WebUILoginDisplay*>(
169 controller->login_display()); 169 controller->login_display());
170 } 170 }
171 171
172 } // namespace chromeos 172 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698