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

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

Issue 366813007: Removed InProcessBrowserTest::CleanUpOnMainThread() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More merge to ToT. Created 6 years, 5 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 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 ExtensionApiTest::SetUpInProcessBrowserTestFixture(); 64 ExtensionApiTest::SetUpInProcessBrowserTestFixture();
65 } 65 }
66 66
67 void OobeBaseTest::SetUpOnMainThread() { 67 void OobeBaseTest::SetUpOnMainThread() {
68 // Restart the thread as the sandbox host process has already been spawned. 68 // Restart the thread as the sandbox host process has already been spawned.
69 embedded_test_server()->RestartThreadAndListen(); 69 embedded_test_server()->RestartThreadAndListen();
70 70
71 ExtensionApiTest::SetUpOnMainThread(); 71 ExtensionApiTest::SetUpOnMainThread();
72 } 72 }
73 73
74 void OobeBaseTest::CleanUpOnMainThread() { 74 void OobeBaseTest::TearDownOnMainThread() {
75 // If the login display is still showing, exit gracefully. 75 // If the login display is still showing, exit gracefully.
76 if (LoginDisplayHostImpl::default_host()) { 76 if (LoginDisplayHostImpl::default_host()) {
77 base::MessageLoop::current()->PostTask(FROM_HERE, 77 base::MessageLoop::current()->PostTask(FROM_HERE,
78 base::Bind(&chrome::AttemptExit)); 78 base::Bind(&chrome::AttemptExit));
79 content::RunMessageLoop(); 79 content::RunMessageLoop();
80 } 80 }
81 81
82 ExtensionApiTest::CleanUpOnMainThread(); 82 ExtensionApiTest::TearDownOnMainThread();
83 } 83 }
84 84
85 void OobeBaseTest::SetUpCommandLine(CommandLine* command_line) { 85 void OobeBaseTest::SetUpCommandLine(CommandLine* command_line) {
86 ExtensionApiTest::SetUpCommandLine(command_line); 86 ExtensionApiTest::SetUpCommandLine(command_line);
87 command_line->AppendSwitch(chromeos::switches::kLoginManager); 87 command_line->AppendSwitch(chromeos::switches::kLoginManager);
88 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests); 88 command_line->AppendSwitch(chromeos::switches::kForceLoginManagerInTests);
89 if (!needs_background_networking_) 89 if (!needs_background_networking_)
90 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking); 90 command_line->AppendSwitch(::switches::kDisableBackgroundNetworking);
91 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user"); 91 command_line->AppendSwitchASCII(chromeos::switches::kLoginProfile, "user");
92 92
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 169
170 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() { 170 WebUILoginDisplay* OobeBaseTest::GetLoginDisplay() {
171 ExistingUserController* controller = 171 ExistingUserController* controller =
172 ExistingUserController::current_controller(); 172 ExistingUserController::current_controller();
173 CHECK(controller); 173 CHECK(controller);
174 return static_cast<WebUILoginDisplay*>( 174 return static_cast<WebUILoginDisplay*>(
175 controller->login_display()); 175 controller->login_display());
176 } 176 }
177 177
178 } // namespace chromeos 178 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698