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

Unified Diff: third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp

Issue 1435773002: Show form validation message as a fallback tooltip. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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: third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp b/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
index fb76476e4fe5de9e315a8f22379de0e386ad988e..c3dd8a6595e0f3d192cd20599e5022e7f3680080 100644
--- a/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLInputElementTest.cpp
@@ -48,4 +48,16 @@ TEST(HTMLInputElementTest, NoAssertWhenMovedInNewDocument)
document.body()->removeChild(document.body()->firstChild());
}
+TEST(HTMLInputElementTest, DefaultToolTip)
+{
+ RefPtrWillBeRawPtr<Document> document = Document::create();
+ RefPtrWillBeRawPtr<HTMLHtmlElement> html = HTMLHtmlElement::create(*document);
+ html->appendChild(HTMLBodyElement::create(*document));
+ RefPtrWillBeRawPtr<HTMLInputElement> input = HTMLInputElement::create(*document, nullptr, false);
+ input->setBooleanAttribute(HTMLNames::requiredAttr, true);
+ toHTMLBodyElement(html->firstChild())->appendChild(input.get());
+ document->appendChild(html.release());
+ EXPECT_EQ("<<ValidationValueMissing>>", input->defaultToolTip());
+}
+
} // namespace blink
« no previous file with comments | « content/test/test_blink_web_unit_test_support.cc ('k') | third_party/WebKit/Source/core/html/forms/InputType.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698