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

Unified Diff: chrome/browser/autofill/autofill_interactive_uitest.cc

Issue 2849603005: Do not reinvent the wheel / use content APIs to find a frame by name. (Closed)
Patch Set: Making the return statement in FrameMatchingPredicate safe against null dereferencing. Created 3 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
« no previous file with comments | « no previous file | chrome/browser/subresource_filter/subresource_filter_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/autofill_interactive_uitest.cc
diff --git a/chrome/browser/autofill/autofill_interactive_uitest.cc b/chrome/browser/autofill/autofill_interactive_uitest.cc
index cd67195ee1d913c3f0b79eb84e0632611a4cf2ee..b77df4ce7d126143fca965bc542c6fa8611f0e1c 100644
--- a/chrome/browser/autofill/autofill_interactive_uitest.cc
+++ b/chrome/browser/autofill/autofill_interactive_uitest.cc
@@ -215,11 +215,8 @@ class AutofillManagerTestDelegateImpl
content::RenderFrameHost* RenderFrameHostForName(
content::WebContents* web_contents,
const std::string& name) {
- for (content::RenderFrameHost* frame : web_contents->GetAllFrames()) {
- if (frame->GetFrameName() == name)
- return frame;
- }
- return nullptr;
+ return content::FrameMatchingPredicate(
+ web_contents, base::Bind(&content::FrameMatchesName, name));
}
} // namespace
« no previous file with comments | « no previous file | chrome/browser/subresource_filter/subresource_filter_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698