summaryrefslogtreecommitdiffstats
path: root/chrome/test
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test')
-rw-r--r--chrome/test/automation/automation_messages_internal.h5
-rw-r--r--chrome/test/automation/automation_proxy.cc4
-rw-r--r--chrome/test/automation/automation_proxy.h5
-rw-r--r--chrome/test/data/save_page/c.htm2
4 files changed, 16 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h
index 47bb11a..6ed478c 100644
--- a/chrome/test/automation/automation_messages_internal.h
+++ b/chrome/test/automation/automation_messages_internal.h
@@ -861,4 +861,9 @@ IPC_BEGIN_MESSAGES(Automation, 0)
IPC_MESSAGE_ROUTED1(AutomationMsg_OverrideEncodingResponse,
bool /* success */)
+ // Used to disable the dialog box that prompts the user for a path when
+ // saving a web page.
+ IPC_MESSAGE_ROUTED1(AutomationMsg_SavePackageShouldPromptUser,
+ bool /* false if we want to not show the dialog */)
+
IPC_END_MESSAGES(Automation)
diff --git a/chrome/test/automation/automation_proxy.cc b/chrome/test/automation/automation_proxy.cc
index 87ed3680..59303b6 100644
--- a/chrome/test/automation/automation_proxy.cc
+++ b/chrome/test/automation/automation_proxy.cc
@@ -241,6 +241,10 @@ void AutomationProxy::SignalNewTabUITab(int load_time) {
::SetEvent(new_tab_ui_load_complete_);
}
+bool AutomationProxy::SavePackageShouldPromptUser(bool should_prompt) {
+ return Send(new AutomationMsg_SavePackageShouldPromptUser(0, should_prompt));
+}
+
bool AutomationProxy::GetBrowserWindowCount(int* num_windows) {
if (!num_windows) {
NOTREACHED();
diff --git a/chrome/test/automation/automation_proxy.h b/chrome/test/automation/automation_proxy.h
index f068a0d..6632604 100644
--- a/chrome/test/automation/automation_proxy.h
+++ b/chrome/test/automation/automation_proxy.h
@@ -174,6 +174,11 @@ class AutomationProxy : public IPC::Channel::Listener,
// load_time is how long, in ms, the tab contents took to load.
void SignalNewTabUITab(int load_time);
+ // Set whether or not running the save page as... command show prompt the
+ // user for a download path. Returns true if the message is successfully
+ // sent.
+ bool SavePackageShouldPromptUser(bool should_prompt);
+
// Returns the ID of the automation IPC channel, so that it can be
// passed to the app as a launch parameter.
const std::wstring& channel_id() const { return channel_id_; }
diff --git a/chrome/test/data/save_page/c.htm b/chrome/test/data/save_page/c.htm
new file mode 100644
index 0000000..a7080046
--- /dev/null
+++ b/chrome/test/data/save_page/c.htm
@@ -0,0 +1,2 @@
+<title>test.exe</title>
+<p>Make sure the saved page is named test.htm.</p> \ No newline at end of file