diff options
Diffstat (limited to 'chrome/test/base')
-rw-r--r-- | chrome/test/base/test_html_dialog_observer.cc | 8 | ||||
-rw-r--r-- | chrome/test/base/test_html_dialog_observer.h | 7 |
2 files changed, 9 insertions, 6 deletions
diff --git a/chrome/test/base/test_html_dialog_observer.cc b/chrome/test/base/test_html_dialog_observer.cc index b9d19bc..8948417 100644 --- a/chrome/test/base/test_html_dialog_observer.cc +++ b/chrome/test/base/test_html_dialog_observer.cc @@ -38,7 +38,7 @@ void TestHtmlDialogObserver::Observe( js_injection_ready_observer_->OnJsInjectionReady( content::Details<RenderViewHost>(details).ptr()); } - web_ui_ = content::Source<WebUI>(source).ptr(); + web_ui_ = content::Source<content::WebUI>(source).ptr(); registrar_.Remove(this, chrome::NOTIFICATION_HTML_DIALOG_SHOWN, content::NotificationService::AllSources()); // Wait for navigation on the new WebUI instance to complete. This depends @@ -50,13 +50,13 @@ void TestHtmlDialogObserver::Observe( // navigate in this method, ensuring that this is not a race condition. registrar_.Add(this, content::NOTIFICATION_LOAD_STOP, content::Source<NavigationController>( - &web_ui_->web_contents()->GetController())); + &web_ui_->GetWebContents()->GetController())); break; case content::NOTIFICATION_LOAD_STOP: DCHECK(web_ui_); registrar_.Remove(this, content::NOTIFICATION_LOAD_STOP, content::Source<NavigationController>( - &web_ui_->web_contents()->GetController())); + &web_ui_->GetWebContents()->GetController())); done_ = true; // If the message loop is running stop it. if (running_) { @@ -69,7 +69,7 @@ void TestHtmlDialogObserver::Observe( }; } -WebUI* TestHtmlDialogObserver::GetWebUI() { +content::WebUI* TestHtmlDialogObserver::GetWebUI() { if (!done_) { EXPECT_FALSE(running_); running_ = true; diff --git a/chrome/test/base/test_html_dialog_observer.h b/chrome/test/base/test_html_dialog_observer.h index a5897ad..7d2ba7c 100644 --- a/chrome/test/base/test_html_dialog_observer.h +++ b/chrome/test/base/test_html_dialog_observer.h @@ -11,7 +11,10 @@ #include "content/public/browser/notification_registrar.h" class JsInjectionReadyObserver; + +namespace content { class WebUI; +} // For browser_tests, which run on the UI thread, run a second message // MessageLoop to detect HtmlDialog creation and quit when the constructed @@ -27,7 +30,7 @@ class TestHtmlDialogObserver : public content::NotificationObserver { // Waits for an HtmlDialog to be created. The WebUI instance is captured // and the method returns it when the navigation on the dialog is complete. - WebUI* GetWebUI(); + content::WebUI* GetWebUI(); private: // content::NotificationObserver: @@ -39,7 +42,7 @@ class TestHtmlDialogObserver : public content::NotificationObserver { // Observer to take some action when the dialog is ready for JavaScript // injection. JsInjectionReadyObserver* js_injection_ready_observer_; - WebUI* web_ui_; + content::WebUI* web_ui_; bool done_; bool running_; |