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

Unified Diff: content/shell/renderer/test_runner/WebFrameTestProxy.h

Issue 231213002: Move modal dialogs from WebViewClient to WebFrameClient, part 1.5/3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: better Created 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/WebTestProxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/shell/renderer/test_runner/WebFrameTestProxy.h
diff --git a/content/shell/renderer/test_runner/WebFrameTestProxy.h b/content/shell/renderer/test_runner/WebFrameTestProxy.h
index 7d450d7a06c9749b20187bcc17ff9962aa26618f..a206751307466edf025687e85ac1ae8c180b24f0 100644
--- a/content/shell/renderer/test_runner/WebFrameTestProxy.h
+++ b/content/shell/renderer/test_runner/WebFrameTestProxy.h
@@ -6,6 +6,9 @@
#define CONTENT_SHELL_RENDERER_TEST_RUNNER_WEBFRAMETESTPROXY_H_
#include "base/basictypes.h"
+#include "content/shell/renderer/test_runner/test_runner.h"
+#include "content/shell/renderer/test_runner/TestInterfaces.h"
+#include "content/shell/renderer/test_runner/WebTestDelegate.h"
#include "content/shell/renderer/test_runner/WebTestProxy.h"
#include "third_party/WebKit/public/platform/WebString.h"
@@ -102,6 +105,21 @@ public:
m_baseProxy->didChangeSelection(is_selection_empty);
Base::didChangeSelection(is_selection_empty);
}
+ virtual void runModalAlertDialog(const blink::WebString& message) {
+ m_baseProxy->m_delegate->printMessage(std::string("ALERT: ") + message.utf8().data() + "\n");
+ }
+ virtual bool runModalConfirmDialog(const blink::WebString& message) {
+ m_baseProxy->m_delegate->printMessage(std::string("CONFIRM: ") + message.utf8().data() + "\n");
+ return true;
+ }
+ virtual bool runModalPromptDialog(const blink::WebString& message, const blink::WebString& defaultValue, blink::WebString*) {
+ m_baseProxy->m_delegate->printMessage(std::string("PROMPT: ") + message.utf8().data() + ", default text: " + defaultValue.utf8().data() + "\n");
+ return true;
+ }
+ virtual bool runModalBeforeUnloadDialog(bool is_reload, const blink::WebString& message) {
+ m_baseProxy->m_delegate->printMessage(std::string("CONFIRM NAVIGATION: ") + message.utf8().data() + "\n");
+ return !m_baseProxy->m_testInterfaces->testRunner()->shouldStayOnPageAfterHandlingBeforeUnload();
+ }
virtual void showContextMenu(const blink::WebContextMenuData& contextMenuData) {
m_baseProxy->showContextMenu(Base::GetWebFrame()->toWebLocalFrame(), contextMenuData);
Base::showContextMenu(contextMenuData);
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/WebTestProxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698