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

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

Issue 995363002: Implement autocapitalize in Blink to be used by the embedder. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: ready for review Created 5 years, 9 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: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index a2d6d383464b47955af54b4036ceb6d7ab212b83..614a90af83d62556f8dedbb28b9b9923af5b803d 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -2094,31 +2094,33 @@ TEST_F(WebViewTest, TextInputFlags)
HTMLDocument* document = toHTMLDocument(frame->frame()->document());
// (A) <input>
- // (A.1) Verifies autocorrect/autocomplete/spellcheck flags are Off.
+ // (A.1) Verifies autocorrect/autocomplete/spellcheck flags are Off and
+ // autocapitalize is set to none.
HTMLInputElement* inputElement = toHTMLInputElement(document->getElementById("input"));
document->setFocusedElement(inputElement);
webViewImpl->setFocus(true);
WebTextInputInfo info = webViewImpl->textInputInfo();
EXPECT_EQ(
- WebTextInputFlagAutocompleteOff | WebTextInputFlagAutocorrectOff | WebTextInputFlagSpellcheckOff,
+ WebTextInputFlagAutocompleteOff | WebTextInputFlagAutocorrectOff | WebTextInputFlagSpellcheckOff | WebTextInputFlagAutocapitalizeNone,
info.flags);
- // (A.2) Verifies autocorrect/autocomplete/spellcheck flags are On.
+ // (A.2) Verifies autocorrect/autocomplete/spellcheck flags are On and
+ // autocapitalize is set to sentences.
inputElement = toHTMLInputElement(document->getElementById("input2"));
document->setFocusedElement(inputElement);
webViewImpl->setFocus(true);
info = webViewImpl->textInputInfo();
EXPECT_EQ(
- WebTextInputFlagAutocompleteOn | WebTextInputFlagAutocorrectOn | WebTextInputFlagSpellcheckOn,
+ WebTextInputFlagAutocompleteOn | WebTextInputFlagAutocorrectOn | WebTextInputFlagSpellcheckOn | WebTextInputFlagAutocapitalizeSentences,
info.flags);
// (B) <textarea> Verifies the default text input flags are
- // WebTextInputFlagNone.
+ // WebTextInputFlagAutocapitalizeSentences.
HTMLTextAreaElement* textAreaElement = toHTMLTextAreaElement(document->getElementById("textarea"));
document->setFocusedElement(textAreaElement);
webViewImpl->setFocus(true);
info = webViewImpl->textInputInfo();
- EXPECT_EQ(WebTextInputFlagNone, info.flags);
+ EXPECT_EQ(WebTextInputFlagAutocapitalizeSentences, info.flags);
// Free the webView before freeing the NonUserInputTextUpdateWebViewClient.
m_webViewHelper.reset();

Powered by Google App Engine
This is Rietveld 408576698