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

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: Addressing sky@'s comments 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
« no previous file with comments | « content/public/test/text_input_test_utils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 e3282b49f2a2677f443018e9cb12365f7ddbc5b9..ed3e7483070dd4393ea62bfc5c8fa6e7fcfa2068 100644
--- a/content/public/test/text_input_test_utils.cc
+++ b/content/public/test/text_input_test_utils.cc
@@ -4,6 +4,8 @@
#include "content/public/test/text_input_test_utils.h"
+#include <unordered_set>
+
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/browser/renderer_host/render_widget_host_view_aura.h"
#include "content/browser/renderer_host/render_widget_host_view_base.h"
@@ -196,10 +198,18 @@ bool GetTextInputTypeForView(WebContents* web_contents,
if (!manager || !manager->IsRegistered(view_base))
return false;
- *type = manager->text_input_state_map_[view_base].type;
+ *type = manager->GetTextInputTypeForViewForTesting(view_base);
+
return true;
}
+size_t GetRegisteredViewsCountFromTextInputManager(WebContents* web_contents) {
+ std::unordered_set<RenderWidgetHostView*> views;
+ TextInputManager* manager =
+ static_cast<WebContentsImpl*>(web_contents)->GetTextInputManager();
+ return !!manager ? manager->GetRegisteredViewsCountForTesting() : 0;
+}
+
RenderWidgetHostView* GetActiveViewFromWebContents(WebContents* web_contents) {
return static_cast<WebContentsImpl*>(web_contents)
->GetTextInputManager()
« no previous file with comments | « 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