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

Side by Side Diff: LayoutTests/fast/forms/suggested-value.html

Issue 130213005: Add autofill preview support for <month> input fields (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase TestExpectations file Created 6 years, 10 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 unified diff | Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/forms/suggested-value-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <p id="description">This test setting suggested values on an input element 4 <p id="description">This test setting suggested values on an input element
5 and a textarea element. The dump below should have the "suggested value" 5 and a textarea element. The dump below should have the "suggested value"
6 instead of "initial value".</p> 6 instead of "initial value".</p>
7 <pre><input id="test" type="text" value="initial value"><textarea id="textarea"> </textarea></pre> 7 <pre><input id="test" type="text" value="initial value"><input id="month" type=" month"><textarea id="textarea"></textarea></pre>
8 <script src="../../resources/dump-as-markup.js"></script> 8 <script src="../../resources/dump-as-markup.js"></script>
9 <script> 9 <script>
10 10
11 var input = document.getElementById('test'); 11 var input = document.getElementById('test');
12 var month = document.getElementById('month');
12 var textarea = document.getElementById('textarea'); 13 var textarea = document.getElementById('textarea');
13 textarea.value = "initial value"; 14 textarea.value = "initial value";
14 var result = document.getElementById('result'); 15 var result = document.getElementById('result');
15 if (!window.internals) 16 if (!window.internals)
16 testFailed('This test requires internals object'); 17 testFailed('This test requires internals object');
17 else { 18 else {
18 input.focus(); 19 input.focus();
19 input.selectionStart = input.selectionEnd = 0; 20 input.selectionStart = input.selectionEnd = 0;
20 21
21 internals.setSuggestedValue(input, 'suggested value'); 22 internals.setSuggestedValue(input, 'suggested value');
23 internals.setSuggestedValue(month, '2014-01');
22 internals.setSuggestedValue(textarea, 'suggested value'); 24 internals.setSuggestedValue(textarea, 'suggested value');
23 25
24 Markup.description(document.getElementById('description').textContent) 26 Markup.description(document.getElementById('description').textContent)
25 27
26 function addTextResult(value) { input.parentNode.appendChild(document.create TextNode(value + ': ' + eval(value))); } 28 function addTextResult(value) { input.parentNode.appendChild(document.create TextNode(value + ': ' + eval(value))); }
27 addTextResult('input.value'); 29 addTextResult('input.value');
28 addTextResult('internals.suggestedValue(input)'); 30 addTextResult('internals.suggestedValue(input)');
29 addTextResult('input.selectionStart'); 31 addTextResult('input.selectionStart');
30 addTextResult('input.selectionEnd'); 32 addTextResult('input.selectionEnd');
33 addTextResult('month.value');
34 addTextResult('internals.suggestedValue(month)');
31 addTextResult('textarea.value'); 35 addTextResult('textarea.value');
32 addTextResult('internals.suggestedValue(textarea)'); 36 addTextResult('internals.suggestedValue(textarea)');
33 37
34 Markup.dump(input.parentNode); 38 Markup.dump(input.parentNode);
35 } 39 }
36 40
37 </script> 41 </script>
38 </body> 42 </body>
39 </html> 43 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/fast/forms/suggested-value-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698