diff options
Diffstat (limited to 'chrome/test/automation/tab_proxy.cc')
-rw-r--r-- | chrome/test/automation/tab_proxy.cc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc index e3529b5..f284b26 100644 --- a/chrome/test/automation/tab_proxy.cc +++ b/chrome/test/automation/tab_proxy.cc @@ -76,6 +76,48 @@ bool TabProxy::OpenFindInPage() { // This message expects no response. } +bool TabProxy::IsFindWindowFullyVisible(bool* is_visible) { + if (!is_valid()) + return false; + + if (!is_visible) { + NOTREACHED(); + return false; + } + + IPC::Message* response = NULL; + bool succeeded = sender_->SendAndWaitForResponse( + new AutomationMsg_FindWindowVisibilityRequest(0, handle_), + &response, + AutomationMsg_FindWindowVisibilityResponse::ID); + if (!succeeded) + return false; + + void* iter = NULL; + response->ReadBool(&iter, is_visible); + delete response; + return true; +} + +bool TabProxy::GetFindWindowLocation(int* x, int* y) { + if (!is_valid() || !x || !y) + return false; + + IPC::Message* response = NULL; + bool succeeded = sender_->SendAndWaitForResponse( + new AutomationMsg_FindWindowLocationRequest(0, handle_), + &response, + AutomationMsg_FindWindowLocationResponse::ID); + if (!succeeded) + return false; + + void* iter = NULL; + response->ReadInt(&iter, x); + response->ReadInt(&iter, y); + delete response; + return true; +} + int TabProxy::FindInPage(const std::wstring& search_string, FindInPageDirection forward, FindInPageCase match_case, |