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

Unified Diff: content/test/layouttest_support.cc

Issue 2333813002: Introduce WebInputMethodController to blink (Closed)
Patch Set: Rebased 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 9051eae99019659ca7bad6e99a39028e8f551f40..b3f8f1a6c6fe9a2717e2d0932c97d81e7286834c 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