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

Unified Diff: third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender.html

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: third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender.html
diff --git a/third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender.html b/third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender.html
index f56b59e1d4b201af2bbb1d848c73e3a571bac72f..b8ce4ff8732d96e0dd946fba5afbcdf07f4e3a1b 100644
--- a/third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender.html
+++ b/third_party/WebKit/LayoutTests/fast/events/composition-event-source-device-event-sender.html
@@ -14,12 +14,20 @@ if (window.eventSender) {
for (var evt of ['compositionstart', 'compositionupdate', 'compositionend']) {
document.addEventListener(evt, compositionHandler);
}
-
+
var input = document.getElementById('input');
input.focus();
+ // We need to force a text input update here so that later the call to
+ // RenderWidget::resetInputMethod() will lead to finishComposingText().
+ // Normally this would not be needed if the focus was due to user gesture.
+ // But on Mac, even with user gesture, we wait for the next compositing
+ // to update text input state frame. That is why we are explicitly calling
+ // this method here.
+ textInputController.forceTextInputStateUpdate();
+
textInputController.setMarkedText('abcde', 1, 3);
-
+
input.blur();
} else {
debug('This test requires eventSender.');

Powered by Google App Engine
This is Rietveld 408576698