OLD | NEW |
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" |
11 #include "chrome/browser/ui/views/browser_dialogs.h" | 11 #include "chrome/browser/ui/views/browser_dialogs.h" |
| 12 #include "chrome/common/chrome_notification_types.h" |
12 #include "chrome/test/ui_test_utils.h" | 13 #include "chrome/test/ui_test_utils.h" |
13 | 14 |
14 namespace chromeos { | 15 namespace chromeos { |
15 | 16 |
16 WizardInProcessBrowserTest::WizardInProcessBrowserTest(const char* screen_name) | 17 WizardInProcessBrowserTest::WizardInProcessBrowserTest(const char* screen_name) |
17 : screen_name_(screen_name), | 18 : screen_name_(screen_name), |
18 controller_(NULL), | 19 controller_(NULL), |
19 host_(NULL) { | 20 host_(NULL) { |
20 } | 21 } |
21 | 22 |
(...skipping 12 matching lines...) Expand all Loading... |
34 | 35 |
35 void WizardInProcessBrowserTest::CleanUpOnMainThread() { | 36 void WizardInProcessBrowserTest::CleanUpOnMainThread() { |
36 // LoginDisplayHost owns controllers and all windows. | 37 // LoginDisplayHost owns controllers and all windows. |
37 MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_); | 38 MessageLoopForUI::current()->DeleteSoon(FROM_HERE, host_); |
38 | 39 |
39 // Observers and what not are notified after the views are deleted, which | 40 // Observers and what not are notified after the views are deleted, which |
40 // happens after a delay (because they are contained in a NativeWidgetGtk | 41 // happens after a delay (because they are contained in a NativeWidgetGtk |
41 // which delays deleting itself). Run the message loop until we know the | 42 // which delays deleting itself). Run the message loop until we know the |
42 // wizard has been deleted. | 43 // wizard has been deleted. |
43 ui_test_utils::WaitForNotification( | 44 ui_test_utils::WaitForNotification( |
44 NotificationType::WIZARD_CONTENT_VIEW_DESTROYED); | 45 chrome::NOTIFICATION_WIZARD_CONTENT_VIEW_DESTROYED); |
45 } | 46 } |
46 | 47 |
47 } // namespace chromeos | 48 } // namespace chromeos |
OLD | NEW |