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

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

Issue 225853005: Add support for setting password value gated on user's gesture in a page (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 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/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/testing/Internals.cpp
diff --git a/Source/core/testing/Internals.cpp b/Source/core/testing/Internals.cpp
index e9924031defc0d5b15614b1367dc9b26e53b37ff..21b6ce7db02b19141bf2b530d3e7b270a44b70a2 100644
--- a/Source/core/testing/Internals.cpp
+++ b/Source/core/testing/Internals.cpp
@@ -1044,6 +1044,21 @@ void Internals::setSuggestedValue(Element* element, const String& value, Excepti
toHTMLSelectElement(*element).setSuggestedValue(value);
}
+void Internals::setValueAfterUserGesture(Element* element, const String& value, ExceptionState& exceptionState)
+{
+ if (!element) {
+ exceptionState.throwDOMException(InvalidAccessError, ExceptionMessages::argumentNullOrIncorrectType(1, "Element"));
+ return;
+ }
+
+ if (!isHTMLInputElement(*element)) {
+ exceptionState.throwDOMException(InvalidNodeTypeError, "The element provided is not a input element.");
+ return;
+ }
+
+ toHTMLInputElement(*element).setValueAfterUserGesture(value);
+}
+
void Internals::setEditingValue(Element* element, const String& value, ExceptionState& exceptionState)
{
if (!element) {
« no previous file with comments | « Source/core/testing/Internals.h ('k') | Source/core/testing/Internals.idl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698