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

Unified Diff: third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp

Issue 2074423004: [InputEvent] Dispatch 'input' event for ContentEditable and typing on Input element (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tkent's review 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: third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
diff --git a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
index 1a8bf2c5683b02ee118b7112671a63d66cc5f7d0..29a7b6b8a670aca9a87eee86260d11f1b46411bc 100644
--- a/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
+++ b/third_party/WebKit/Source/core/editing/InputMethodControllerTest.cpp
@@ -356,7 +356,10 @@ TEST_F(InputMethodControllerTest, CompositionFireBeforeInput)
Element* script = document().createElement("script", ASSERT_NO_EXCEPTION);
script->setInnerHTML(
"document.getElementById('sample').addEventListener('beforeinput', function(event) {"
- " document.title = `beforeinput.isComposing:${event.isComposing}`;"
+ " document.title = `beforeinput.isComposing:${event.isComposing};`;"
+ "});"
+ "document.getElementById('sample').addEventListener('input', function(event) {"
+ " document.title += `input.isComposing:${event.isComposing};`;"
"});",
ASSERT_NO_EXCEPTION);
document().body()->appendChild(script, ASSERT_NO_EXCEPTION);
@@ -369,12 +372,12 @@ TEST_F(InputMethodControllerTest, CompositionFireBeforeInput)
document().setTitle(emptyString());
controller().setComposition("foo", underlines, 0, 3);
- EXPECT_STREQ("beforeinput.isComposing:true", document().title().utf8().data());
+ EXPECT_STREQ("beforeinput.isComposing:true;input.isComposing:true;", document().title().utf8().data());
document().setTitle(emptyString());
controller().confirmComposition();
// Last 'beforeinput' should also be inside composition scope.
- EXPECT_STREQ("beforeinput.isComposing:true", document().title().utf8().data());
+ EXPECT_STREQ("beforeinput.isComposing:true;input.isComposing:true;", document().title().utf8().data());
chongz 2016/06/23 00:32:06 Testing |isComposing|
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/editing/Editor.cpp ('k') | third_party/WebKit/Source/core/editing/commands/TypingCommand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698