summaryrefslogtreecommitdiffstats
path: root/chrome/test/automation/tab_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/test/automation/tab_proxy.cc')
-rw-r--r--chrome/test/automation/tab_proxy.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/chrome/test/automation/tab_proxy.cc b/chrome/test/automation/tab_proxy.cc
index 7668c19..0b87689 100644
--- a/chrome/test/automation/tab_proxy.cc
+++ b/chrome/test/automation/tab_proxy.cc
@@ -121,7 +121,8 @@ bool TabProxy::GetFindWindowLocation(int* x, int* y) {
int TabProxy::FindInPage(const std::wstring& search_string,
FindInPageDirection forward,
FindInPageCase match_case,
- bool find_next) {
+ bool find_next,
+ int* active_ordinal) {
if (!is_valid())
return -1;
@@ -136,14 +137,18 @@ int TabProxy::FindInPage(const std::wstring& search_string,
bool succeeded = sender_->SendAndWaitForResponse(
new AutomationMsg_FindRequest(0, handle_, request),
&response,
- AutomationMsg_FindInPageResponse::ID);
+ AutomationMsg_FindInPageResponse2::ID);
if (!succeeded)
return -1;
void* iter = NULL;
+ int ordinal;
int matches_found;
- AutomationMsg_FindInPageResponse::Read(response, &matches_found);
-
+ response->ReadInt(&iter, &ordinal);
+ response->ReadInt(&iter, &matches_found);
+ if (active_ordinal)
+ *active_ordinal = ordinal;
+ delete response;
return matches_found;
}