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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « third_party/WebKit/Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 3198 matching lines...) Expand 10 before | Expand all | Expand 10 after
3209 3209
3210 result = WebSubstringUtil::attributedSubstringInRange(frame, 5, 5, &baseline Point); 3210 result = WebSubstringUtil::attributedSubstringInRange(frame, 5, 5, &baseline Point);
3211 ASSERT_TRUE(!!result); 3211 ASSERT_TRUE(!!result);
3212 3212
3213 point = WebPoint(baselinePoint.x, frameView->height() - baselinePoint.y); 3213 point = WebPoint(baselinePoint.x, frameView->height() - baselinePoint.y);
3214 result = WebSubstringUtil::attributedWordAtPoint(webView, point, baselinePoi nt); 3214 result = WebSubstringUtil::attributedWordAtPoint(webView, point, baselinePoi nt);
3215 ASSERT_TRUE(!!result); 3215 ASSERT_TRUE(!!result);
3216 } 3216 }
3217 #endif 3217 #endif
3218 3218
3219 TEST_F(WebViewTest, PasswordFieldEditingIsUserGesture)
3220 {
3221 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c _str()), WebString::fromUTF8("input_field_password.html"));
3222 MockAutofillClient client;
3223 WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "input_fiel d_password.html", true);
3224 WebLocalFrameImpl* frame = toWebLocalFrameImpl(webView->mainFrame());
3225 frame->setAutofillClient(&client);
3226 webView->setInitialFocus(false);
3227
3228 EXPECT_TRUE(webView->confirmComposition(WebString::fromUTF8(std::string("hel lo").c_str())));
3229 EXPECT_EQ(1, client.textChangesFromUserGesture());
3230 EXPECT_FALSE(UserGestureIndicator::processingUserGesture());
3231 frame->setAutofillClient(0);
3232 }
3233
3219 } // namespace blink 3234 } // namespace blink
OLDNEW
« 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