summaryrefslogtreecommitdiff
path: root/Source/WebKit/chromium/tests/WebViewTest.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
committerSimon Hausmann <simon.hausmann@nokia.com>2012-05-11 09:43:24 +0200
commit1b914638db989aaa98631a1c1e02c7b2d44805d8 (patch)
tree87f4fd2c7b38db320079a5de8877890d2ca3c485 /Source/WebKit/chromium/tests/WebViewTest.cpp
parent2cf6c8816a73e0132bd8fa3b509d62d7c51b6e47 (diff)
downloadqtwebkit-1b914638db989aaa98631a1c1e02c7b2d44805d8.tar.gz
Imported WebKit commit 9a52e27980f47e8b0d8f8b7cc0fd7b5741bceb92 (http://svn.webkit.org/repository/webkit/trunk@116736)
New snapshot to include QDeclarative* -> QQml* build fixes
Diffstat (limited to 'Source/WebKit/chromium/tests/WebViewTest.cpp')
-rw-r--r--Source/WebKit/chromium/tests/WebViewTest.cpp42
1 files changed, 42 insertions, 0 deletions
diff --git a/Source/WebKit/chromium/tests/WebViewTest.cpp b/Source/WebKit/chromium/tests/WebViewTest.cpp
index 00d8a832d..460c62bd2 100644
--- a/Source/WebKit/chromium/tests/WebViewTest.cpp
+++ b/Source/WebKit/chromium/tests/WebViewTest.cpp
@@ -110,6 +110,8 @@ protected:
int expectedWidth, int expectedHeight,
HorizontalScrollbarState expectedHorizontalState, VerticalScrollbarState expectedVerticalState);
+ void testTextInputType(WebTextInputType expectedType, const std::string& htmlFile);
+
std::string m_baseURL;
};
@@ -245,4 +247,44 @@ TEST_F(WebViewTest, AutoResizeMaxSize)
expectedWidth, expectedHeight, NoHorizontalScrollbar, NoVerticalScrollbar);
}
+void WebViewTest::testTextInputType(WebTextInputType expectedType, const std::string& htmlFile)
+{
+ FrameTestHelpers::registerMockedURLLoad(m_baseURL, htmlFile);
+ WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + htmlFile);
+ webView->setInitialFocus(false);
+ EXPECT_EQ(expectedType, webView->textInputType());
+ webView->close();
+}
+
+// Disabled for https://bugs.webkit.org/show_bug.cgi?id=78746#c29
+TEST_F(WebViewTest, DISABLED_TextInputType)
+{
+ testTextInputType(WebTextInputTypeText, "input_field_default.html");
+ testTextInputType(WebTextInputTypePassword, "input_field_password.html");
+ testTextInputType(WebTextInputTypeEmail, "input_field_email.html");
+ testTextInputType(WebTextInputTypeSearch, "input_field_search.html");
+ testTextInputType(WebTextInputTypeNumber, "input_field_number.html");
+ testTextInputType(WebTextInputTypeTelephone, "input_field_tel.html");
+ testTextInputType(WebTextInputTypeURL, "input_field_url.html");
+#if ENABLE(INPUT_TYPE_DATE)
+ testTextInputType(WebTextInputTypeDate, "input_field_date.html");
+#endif
+#if ENABLE(INPUT_TYPE_DATETIME)
+ testTextInputType(WebTextInputTypeDateTime, "input_field_datetime.html");
+#endif
+#if ENABLE(INPUT_TYPE_DATETIMELOCAL)
+ testTextInputType(WebTextInputTypeDateTimeLocal, "input_field_datetimelocal.html");
+#endif
+#if ENABLE(INPUT_TYPE_MONTH)
+ testTextInputType(WebTextInputTypeMonth, "input_field_month.html");
+#endif
+#if ENABLE(INPUT_TYPE_TIME)
+ testTextInputType(WebTextInputTypeTime, "input_field_time.html");
+#endif
+#if ENABLE(INPUT_TYPE_WEEK)
+ testTextInputType(WebTextInputTypeWeek, "input_field_week.html");
+#endif
+
+}
+
}