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

Unified Diff: third_party/WebKit/Source/web/tests/WebViewTest.cpp

Issue 1644993002: Initialize UserGestureIndicator for IME commitText. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Final patch for landing Created 4 years, 10 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 | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
index e91eee8f9885e38fb5e7234c829d9f463453fbdb..8963c600fbfa0b6d33c88fdc4bf8cb99a3e9e705 100644
--- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
+++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
@@ -3216,4 +3216,19 @@ TEST_F(WebViewTest, WebSubstringUtil)
}
#endif
+TEST_F(WebViewTest, PasswordFieldEditingIsUserGesture)
+{
+ URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("input_field_password.html"));
+ MockAutofillClient client;
+ WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "input_field_password.html", true);
+ WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame());
+ frame->setAutofillClient(&client);
+ webView->setInitialFocus(false);
+
+ EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hello").c_str())));
+ EXPECT_EQ(1, client.textChangesFromUserGesture());
+ EXPECT_FALSE(UserGestureIndicator::processingUserGesture());
+ frame->setAutofillClient(0);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698