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

Unified Diff: content/public/test/find_test_utils.cc

Issue 2723253002: Fix beep when navigating/closing a page with find bar open
Patch Set: android Created 3 years, 10 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
« no previous file with comments | « content/public/test/find_test_utils.h ('k') | content/test/data/find_with_frame_removal.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/find_test_utils.cc
diff --git a/content/public/test/find_test_utils.cc b/content/public/test/find_test_utils.cc
index e7e04d3879d855c648c48413b8f7f2514379ec15..df98bc64e4da2037509d76062744b40caa18ab63 100644
--- a/content/public/test/find_test_utils.cc
+++ b/content/public/test/find_test_utils.cc
@@ -16,12 +16,14 @@ const int kInvalidId = -1;
FindResults::FindResults(int request_id,
int number_of_matches,
- int active_match_ordinal)
+ int active_match_ordinal,
+ bool was_frame_removal)
: request_id(request_id),
number_of_matches(number_of_matches),
- active_match_ordinal(active_match_ordinal) {}
+ active_match_ordinal(active_match_ordinal),
+ was_frame_removal(was_frame_removal) {}
-FindResults::FindResults() : FindResults(kInvalidId, 0, 0) {}
+FindResults::FindResults() : FindResults(kInvalidId, 0, 0, false) {}
FindTestWebContentsDelegate::FindTestWebContentsDelegate()
: last_request_id_(kInvalidId),
@@ -79,10 +81,11 @@ void FindTestWebContentsDelegate::FindReply(WebContents* web_contents,
int number_of_matches,
const gfx::Rect& selection_rect,
int active_match_ordinal,
- bool final_update) {
+ bool final_update,
+ bool was_frame_removal) {
if (record_replies_) {
- reply_record_.emplace_back(
- request_id, number_of_matches, active_match_ordinal);
+ reply_record_.emplace_back(request_id, number_of_matches,
+ active_match_ordinal, was_frame_removal);
}
// Update the current results.
@@ -92,6 +95,7 @@ void FindTestWebContentsDelegate::FindReply(WebContents* web_contents,
current_results_.number_of_matches = number_of_matches;
if (active_match_ordinal != -1)
current_results_.active_match_ordinal = active_match_ordinal;
+ current_results_.was_frame_removal = was_frame_removal;
if (!final_update)
return;
« no previous file with comments | « content/public/test/find_test_utils.h ('k') | content/test/data/find_with_frame_removal.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698