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

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

Issue 6870016: Refcount browser process in BaseLoginDisplayHost so message loop does not exit (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Delete LoginDisplayHost in MessageLoop::Run() context in test framework. Created 9 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
« no previous file with comments | « chrome/browser/chromeos/login/base_login_display_host.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/wizard_in_process_browser_test.h" 5 #include "chrome/browser/chromeos/login/wizard_in_process_browser_test.h"
6 6
7 #include "base/message_loop.h" 7 #include "base/message_loop.h"
8 #include "chrome/browser/chromeos/login/base_login_display_host.h" 8 #include "chrome/browser/chromeos/login/base_login_display_host.h"
9 #include "chrome/browser/chromeos/login/wizard_controller.h" 9 #include "chrome/browser/chromeos/login/wizard_controller.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 16 matching lines...) Expand all
27 if (!screen_name_.empty()) { 27 if (!screen_name_.empty()) {
28 browser::ShowLoginWizard(screen_name_.c_str(), gfx::Size(1024, 600)); 28 browser::ShowLoginWizard(screen_name_.c_str(), gfx::Size(1024, 600));
29 controller_ = WizardController::default_controller(); 29 controller_ = WizardController::default_controller();
30 host_ = BaseLoginDisplayHost::default_host(); 30 host_ = BaseLoginDisplayHost::default_host();
31 } 31 }
32 return NULL; 32 return NULL;
33 } 33 }
34 34
35 void WizardInProcessBrowserTest::CleanUpOnMainThread() { 35 void WizardInProcessBrowserTest::CleanUpOnMainThread() {
36 // LoginDisplayHost owns controllers and all windows. 36 // LoginDisplayHost owns controllers and all windows.
37 delete host_; 37 MessageLoopForUI::current()->DeleteSoon(FROM_HERE,host_);
38 38
39 // Observers and what not are notified after the views are deleted, which 39 // Observers and what not are notified after the views are deleted, which
40 // happens after a delay (because they are contained in a WidgetGtk which 40 // happens after a delay (because they are contained in a WidgetGtk which
41 // delays deleting itself). Run the message loop until we know the wizard 41 // delays deleting itself). Run the message loop until we know the wizard
42 // has been deleted. 42 // has been deleted.
43 ui_test_utils::WaitForNotification( 43 ui_test_utils::WaitForNotification(
44 NotificationType::WIZARD_CONTENT_VIEW_DESTROYED); 44 NotificationType::WIZARD_CONTENT_VIEW_DESTROYED);
45 } 45 }
46 46
47 } // namespace chromeos 47 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/base_login_display_host.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698