diff options
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/automation/automation_messages_internal.h | 3 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 7 | ||||
-rw-r--r-- | chrome/test/automation/tab_proxy.h | 3 |
3 files changed, 13 insertions, 0 deletions
diff --git a/chrome/test/automation/automation_messages_internal.h b/chrome/test/automation/automation_messages_internal.h index 1eac286..ac1b7deb 100644 --- a/chrome/test/automation/automation_messages_internal.h +++ b/chrome/test/automation/automation_messages_internal.h @@ -973,4 +973,7 @@ IPC_BEGIN_MESSAGES(Automation) int /* request_id */, URLRequestStatus /* status */) + IPC_MESSAGE_ROUTED1(AutomationMsg_PrintAsync, + int /* tab_handle */) + IPC_END_MESSAGES(Automation) diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index dea3a54..8d8ebf7 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -532,6 +532,13 @@ bool TabProxy::PrintNow() { return succeeded; } +bool TabProxy::PrintAsync() { + if (!is_valid()) + return false; + + return sender_->Send(new AutomationMsg_PrintAsync(0, handle_)); +} + bool TabProxy::SavePage(const std::wstring& file_name, const std::wstring& dir_path, SavePackage::SavePackageType type) { diff --git a/chrome/test/automation/tab_proxy.h b/chrome/test/automation/tab_proxy.h index 0f7bcc5..200c5f9 100644 --- a/chrome/test/automation/tab_proxy.h +++ b/chrome/test/automation/tab_proxy.h @@ -250,6 +250,9 @@ class TabProxy : public AutomationResourceProxy { // Prints the current page without user intervention. bool PrintNow(); + // Sends off an asynchronous request for printing. + bool PrintAsync(); + // Save the current web page. |file_name| is the HTML file name, and // |dir_path| is the directory for saving resource files. |type| indicates // which type we're saving as: HTML only or the complete web page. |