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

Unified Diff: Source/WebCore/testing/Internals.cpp

Issue 7796022: Merge 94586 - REGRESSION(r94274): FormManagerTest.PreviewForm and FillFormNonEmptyField fail on c... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/874/
Patch Set: Created 9 years, 3 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
« no previous file with comments | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebCore/testing/Internals.cpp
===================================================================
--- Source/WebCore/testing/Internals.cpp (revision 94880)
+++ Source/WebCore/testing/Internals.cpp (working copy)
@@ -303,4 +303,34 @@
return false;
}
+String Internals::suggestedValue(Element* inputElement, ExceptionCode& ec)
+{
+ if (!inputElement) {
+ ec = INVALID_ACCESS_ERR;
+ return String();
+ }
+
+ if (!inputElement->hasTagName(HTMLNames::inputTag)) {
+ ec = INVALID_NODE_TYPE_ERR;
+ return String();
+ }
+
+ return static_cast<HTMLInputElement*>(inputElement)->suggestedValue();
}
+
+void Internals::setSuggestedValue(Element* inputElement, const String& value, ExceptionCode& ec)
+{
+ if (!inputElement) {
+ ec = INVALID_ACCESS_ERR;
+ return;
+ }
+
+ if (!inputElement->hasTagName(HTMLNames::inputTag)) {
+ ec = INVALID_NODE_TYPE_ERR;
+ return;
+ }
+
+ static_cast<HTMLInputElement*>(inputElement)->setSuggestedValue(value);
+}
+
+}
« no previous file with comments | « Source/WebCore/testing/Internals.h ('k') | Source/WebCore/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698