| 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/test/base/test_html_dialog_observer.h" | 5 #include "chrome/test/base/test_html_dialog_observer.h" |
| 6 | 6 |
| 7 #include "chrome/common/chrome_notification_types.h" | 7 #include "chrome/common/chrome_notification_types.h" |
| 8 #include "content/test/js_injection_ready_observer.h" | 8 #include "content/test/js_injection_ready_observer.h" |
| 9 #include "chrome/test/base/ui_test_utils.h" | 9 #include "chrome/test/base/ui_test_utils.h" |
| 10 #include "content/public/browser/notification_service.h" | 10 #include "content/public/browser/notification_service.h" |
| 11 #include "content/browser/tab_contents/navigation_controller.h" | |
| 12 #include "content/browser/webui/web_ui.h" | 11 #include "content/browser/webui/web_ui.h" |
| 12 #include "content/public/browser/navigation_controller.h" |
| 13 #include "content/public/browser/notification_details.h" | 13 #include "content/public/browser/notification_details.h" |
| 14 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
| 15 #include "content/public/browser/notification_types.h" | 15 #include "content/public/browser/notification_types.h" |
| 16 #include "content/public/browser/web_contents.h" | 16 #include "content/public/browser/web_contents.h" |
| 17 | 17 |
| 18 TestHtmlDialogObserver::TestHtmlDialogObserver( | 18 TestHtmlDialogObserver::TestHtmlDialogObserver( |
| 19 JsInjectionReadyObserver* js_injection_ready_observer) | 19 JsInjectionReadyObserver* js_injection_ready_observer) |
| 20 : js_injection_ready_observer_(js_injection_ready_observer), | 20 : js_injection_ready_observer_(js_injection_ready_observer), |
| 21 web_ui_(NULL), done_(false), running_(false) { | 21 web_ui_(NULL), done_(false), running_(false) { |
| 22 registrar_.Add(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN, | 22 registrar_.Add(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN, |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 } | 68 } |
| 69 | 69 |
| 70 WebUI* TestHtmlDialogObserver::GetWebUI() { | 70 WebUI* TestHtmlDialogObserver::GetWebUI() { |
| 71 if (!done_) { | 71 if (!done_) { |
| 72 EXPECT_FALSE(running_); | 72 EXPECT_FALSE(running_); |
| 73 running_ = true; | 73 running_ = true; |
| 74 ui_test_utils::RunMessageLoop(); | 74 ui_test_utils::RunMessageLoop(); |
| 75 } | 75 } |
| 76 return web_ui_; | 76 return web_ui_; |
| 77 } | 77 } |
| OLD | NEW |