Chromium Code Reviews| 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 dad531cd22a7b19ed7fc73e70267f4ff48a03ea3..f187170bbeab61f0f5f5d918fb91eede98a317b2 100644 |
| --- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp |
| +++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp |
| @@ -239,7 +239,7 @@ class WebViewTest : public ::testing::Test { |
| void testTextInputType(WebTextInputType expectedType, |
| const std::string& htmlFile); |
| - void testInputMode(const WebString& expectedInputMode, |
| + void testInputMode(WebTextInputMode expectedInputMode, |
| const std::string& htmlFile); |
| bool tapElement(WebInputEvent::Type, Element*); |
| bool tapElementById(WebInputEvent::Type, const WebString& id); |
| @@ -794,7 +794,7 @@ TEST_F(WebViewTest, TextInputInfoUpdateStyleAndLayout) { |
| EXPECT_EQ(WebTextInputTypeText, webViewImpl->textInputInfo().type); |
| } |
| -void WebViewTest::testInputMode(const WebString& expectedInputMode, |
| +void WebViewTest::testInputMode(WebTextInputMode expectedInputMode, |
| const std::string& htmlFile) { |
| URLTestHelpers::registerMockedURLFromBaseURL( |
| WebString::fromUTF8(m_baseURL.c_str()), |
| @@ -805,13 +805,40 @@ void WebViewTest::testInputMode(const WebString& expectedInputMode, |
| } |
| TEST_F(WebViewTest, InputMode) { |
| - testInputMode(WebString(), "input_mode_default.html"); |
| - testInputMode(WebString("unknown"), "input_mode_default_unknown.html"); |
| - testInputMode(WebString("verbatim"), "input_mode_default_verbatim.html"); |
| - testInputMode(WebString("verbatim"), "input_mode_type_text_verbatim.html"); |
| - testInputMode(WebString("verbatim"), "input_mode_type_search_verbatim.html"); |
| - testInputMode(WebString(), "input_mode_type_url_verbatim.html"); |
| - testInputMode(WebString("verbatim"), "input_mode_textarea_verbatim.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeDefault, |
| + "input_mode_default.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeDefault, |
| + "input_mode_default_unknown.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeVerbatim, |
|
esprehn
2016/10/24 21:12:26
All of this seems like it should be unit tests ins
|
| + "input_mode_default_verbatim.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeVerbatim, |
| + "input_mode_type_text_verbatim.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeVerbatim, |
| + "input_mode_type_search_verbatim.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeDefault, |
| + "input_mode_type_url_verbatim.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeLatin, |
| + "input_mode_type_latin.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeLatinName, |
| + "input_mode_type_latin_name.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeLatinProse, |
| + "input_mode_type_latin_prose.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeFullWidthLatin, |
| + "input_mode_type_full_width_latin.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeKana, |
| + "input_mode_type_kana.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeKanaName, |
| + "input_mode_type_kana_name.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeKataKana, |
| + "input_mode_type_kata_kana.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeNumeric, |
| + "input_mode_type_numeric.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeTel, |
| + "input_mode_type_tel.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeEmail, |
| + "input_mode_type_email.html"); |
| + testInputMode(WebTextInputMode::kWebTextInputModeUrl, |
| + "input_mode_type_url.html"); |
| } |
| TEST_F(WebViewTest, TextInputInfoWithReplacedElements) { |