Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(344)

Unified Diff: chrome/test/automation/tab_proxy.cc

Issue 13130: Fix issue 5079: Incorrect "Active match ordinal" count during Find-in-page... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/test/automation/tab_proxy.cc
===================================================================
--- chrome/test/automation/tab_proxy.cc (revision 6273)
+++ chrome/test/automation/tab_proxy.cc (working copy)
@@ -121,7 +121,8 @@
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 @@
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;
}

Powered by Google App Engine
This is Rietveld 408576698