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

Unified Diff: content/test/layouttest_support.cc

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Explicitly asking for TextInputState updates Created 4 years, 1 month 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/test/layouttest_support.cc
diff --git a/content/test/layouttest_support.cc b/content/test/layouttest_support.cc
index df166e20fcd1eef1e05bad656185ae75161da40d..708d86465c01590f5e5cdff7b7cf5fefe4f07f9b 100644
--- a/content/test/layouttest_support.cc
+++ b/content/test/layouttest_support.cc
@@ -31,6 +31,7 @@
#include "content/renderer/gpu/render_widget_compositor.h"
#include "content/renderer/history_entry.h"
#include "content/renderer/history_serialization.h"
+#include "content/renderer/input/render_widget_input_handler_delegate.h"
#include "content/renderer/layout_test_dependencies.h"
#include "content/renderer/render_frame_impl.h"
#include "content/renderer/render_thread_impl.h"
@@ -1129,4 +1130,12 @@ void SchedulerRunIdleTasks(const base::Closure& callback) {
blink::scheduler::RunIdleTasksForTesting(scheduler, callback);
}
+void ForceTextInputStateUpdateForRenderFrame(RenderFrame* frame) {
+ if (auto* render_widget =
+ static_cast<RenderFrameImpl*>(frame)->GetRenderWidget()) {
+ render_widget->UpdateTextInputState(ShowIme::IF_NEEDED,
+ ChangeSource::FROM_NON_IME);
+ }
+}
+
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698