OLD | NEW |
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 Loading... |
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 |
OLD | NEW |