| 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
|
|
|