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); |