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

Unified Diff: chrome/browser/ui/webui/html_dialog_ui.cc

Issue 7861024: Adds testing infrastructure to web_ui_browsertest to support testing HtmlDialogs. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move observing html dialog to separate class and test declarations to JS. Created 9 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/webui/html_dialog_ui.cc
diff --git a/chrome/browser/ui/webui/html_dialog_ui.cc b/chrome/browser/ui/webui/html_dialog_ui.cc
index fd3341a4bbe187646a511a3a239a7d6a266e4bbf..511c8e4300fe939b80da4520f4a611bd23472874 100644
--- a/chrome/browser/ui/webui/html_dialog_ui.cc
+++ b/chrome/browser/ui/webui/html_dialog_ui.cc
@@ -7,9 +7,11 @@
#include "base/callback.h"
#include "base/lazy_instance.h"
#include "base/values.h"
+#include "chrome/common/chrome_notification_types.h"
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/common/bindings_policy.h"
+#include "content/common/notification_service.h"
static base::LazyInstance<PropertyAccessor<HtmlDialogUIDelegate*> >
g_html_dialog_ui_property_accessor(base::LINKER_INITIALIZED);
@@ -60,6 +62,11 @@ void HtmlDialogUI::RenderViewCreated(RenderViewHost* render_view_host) {
(*it)->Attach(this);
AddMessageHandler(*it);
}
+
+ NotificationService::current()->Notify(
+ chrome::NOTIFICATION_HTML_DIALOG_SHOWN,
+ Source<HtmlDialogUI>(this),
+ NotificationService::NoDetails());
}
void HtmlDialogUI::OnDialogClosed(const ListValue* args) {

Powered by Google App Engine
This is Rietveld 408576698