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

Unified Diff: LayoutTests/fast/forms/suggested-value.html

Issue 120443003: Add autofill preview support for Textarea (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Add test code for textarea setSuggestedValue() Created 6 years, 11 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
Index: LayoutTests/fast/forms/suggested-value.html
diff --git a/LayoutTests/fast/forms/suggested-value.html b/LayoutTests/fast/forms/suggested-value.html
index 482d4965e9512fda2cf93d5ff3e7fd18cb911a78..988b515cde791f310871684a764910df34dad9a3 100644
--- a/LayoutTests/fast/forms/suggested-value.html
+++ b/LayoutTests/fast/forms/suggested-value.html
@@ -1,13 +1,16 @@
<!DOCTYPE html>
<html>
<body>
-<p id="description">This test setting a suggested value on an input element.
-The dump below should have the "suggested value" instead of "initial value".</p>
-<pre><input id="test" type="text" value="initial value"></pre>
+<p id="description">This test setting suggested values on an input element
+and a textarea element. The dump below should have the "suggested value"
+instead of "initial value".</p>
+<pre><input id="test" type="text" value="initial value"><textarea id="textarea"></textarea></pre>
<script src="../../resources/dump-as-markup.js"></script>
<script>
var input = document.getElementById('test');
+var textarea = document.getElementById('textarea');
+textarea.value = "initial value";
var result = document.getElementById('result');
if (!window.internals)
testFailed('This test requires internals object');
@@ -16,6 +19,7 @@ else {
input.selectionStart = input.selectionEnd = 0;
internals.setSuggestedValue(input, 'suggested value');
+ internals.setSuggestedValue(textarea, 'suggested value');
Markup.description(document.getElementById('description').textContent)
@@ -24,7 +28,9 @@ else {
addTextResult('internals.suggestedValue(input)');
addTextResult('input.selectionStart');
addTextResult('input.selectionEnd');
-
+ addTextResult('textarea.value');
+ addTextResult('internals.suggestedValue(textarea)');
+
Markup.dump(input.parentNode);
}
« no previous file with comments | « no previous file | LayoutTests/fast/forms/suggested-value-expected.txt » ('j') | Source/core/html/HTMLTextAreaElement.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698