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

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

Issue 2054163003: Fix SitePerProcessTextInputManagerTest.StopTrackingCrashedChildFrame on CFI Bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Do not assume we only have 2 views registered in the begining. Created 4 years, 6 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/public/test/text_input_test_utils.cc
diff --git a/content/public/test/text_input_test_utils.cc b/content/public/test/text_input_test_utils.cc
index 895f7b743d0bee0f76c7df4b0aa4641cdf921927..83b75a3fa3ad418fd2a1b44ee366fcd63fd322be 100644
--- a/content/public/test/text_input_test_utils.cc
+++ b/content/public/test/text_input_test_utils.cc
@@ -199,6 +199,18 @@ bool GetTextInputTypeForView(WebContents* web_contents,
return true;
}
+std::unordered_set<RenderWidgetHostView*>
+GetAllViewsRegisteredWithTextInputManager(WebContents* web_contents) {
+ std::unordered_set<RenderWidgetHostView*> views;
+ TextInputManager* manager =
+ static_cast<WebContentsImpl*>(web_contents)->GetTextInputManager();
+ if (manager) {
+ for (auto pair : manager->text_input_state_map_)
+ views.insert(pair.first);
+ }
+ return views;
+}
+
RenderWidgetHostView* GetActiveViewFromWebContents(WebContents* web_contents) {
return static_cast<WebContentsImpl*>(web_contents)
->GetTextInputManager()
« content/public/test/text_input_test_utils.h ('K') | « content/public/test/text_input_test_utils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698