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

Unified Diff: content/browser/find_request_manager.cc

Issue 1891773002: Implement the basic testing infrastructure for FindRequestManager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comments by nasko@. Created 4 years, 8 months 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: content/browser/find_request_manager.cc
diff --git a/content/browser/find_request_manager.cc b/content/browser/find_request_manager.cc
index ad6b24e14371b7986725e79fc34521f8577bfca2..a43bef78e8feb073905ee8718f6a81ffc88bdc25 100644
--- a/content/browser/find_request_manager.cc
+++ b/content/browser/find_request_manager.cc
@@ -64,9 +64,12 @@ void FindRequestManager::OnFindReply(RenderFrameHost* rfh,
return;
// Update the stored results.
- number_of_matches_ = number_of_matches;
- selection_rect_ = selection_rect;
- active_match_ordinal_ = active_match_ordinal;
+ if (number_of_matches != -1)
+ number_of_matches_ = number_of_matches;
+ if (!selection_rect.IsEmpty())
+ selection_rect_ = selection_rect;
+ if (active_match_ordinal > 0)
+ active_match_ordinal_ = active_match_ordinal;
nasko 2016/04/18 21:02:39 See my comment in the test file. Updating these co
paulmeyer 2016/04/19 15:15:00 This was intentional, and is something that FindRe
NotifyFindReply(request_id, final_update);
}

Powered by Google App Engine
This is Rietveld 408576698