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

Side by Side Diff: LayoutTests/fast/forms/date-multiple-fields/date-multiple-fields-focus.html

Issue 58533003: Move fast/js/resources files to resources. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <body> 2 <body>
3 <script src="../../js/resources/js-test-pre.js"></script> 3 <script src="../../../resources/js-test.js"></script>
4 <script> 4 <script>
5 description('Check if element.focus() does not focus on disabled sub-fields.'); 5 description('Check if element.focus() does not focus on disabled sub-fields.');
6 if (window.internals) 6 if (window.internals)
7 internals.settings.setLangAttributeAwareFormControlUIEnabled(true); 7 internals.settings.setLangAttributeAwareFormControlUIEnabled(true);
8 else 8 else
9 debug('This test requires DRT/WRT.'); 9 debug('This test requires DRT/WRT.');
10 10
11 var dateInput = document.createElement('input'); 11 var dateInput = document.createElement('input');
12 dateInput.lang = 'ja-jp'; 12 dateInput.lang = 'ja-jp';
13 dateInput.type = 'date'; 13 dateInput.type = 'date';
14 dateInput.min = '2013-02-01'; 14 dateInput.min = '2013-02-01';
15 dateInput.max = '2013-03-30'; 15 dateInput.max = '2013-03-30';
16 document.body.appendChild(dateInput); 16 document.body.appendChild(dateInput);
17 // Assume the date format is "yyyy/MM/dd" 17 // Assume the date format is "yyyy/MM/dd"
18 18
19 dateInput.focus(); 19 dateInput.focus();
20 // Because the year field is fixed, the first focusable element is the 20 // Because the year field is fixed, the first focusable element is the
21 // month field. 21 // month field.
22 shouldBeEqualToString('internals.youngestShadowRoot(dateInput).activeElement.get Attribute("part")', '-webkit-datetime-edit-month-field'); 22 shouldBeEqualToString('internals.youngestShadowRoot(dateInput).activeElement.get Attribute("part")', '-webkit-datetime-edit-month-field');
23 dateInput.blur(); 23 dateInput.blur();
24 dateInput.focus(); 24 dateInput.focus();
25 shouldBeEqualToString('internals.youngestShadowRoot(dateInput).activeElement.get Attribute("part")', '-webkit-datetime-edit-month-field'); 25 shouldBeEqualToString('internals.youngestShadowRoot(dateInput).activeElement.get Attribute("part")', '-webkit-datetime-edit-month-field');
26 26
27 dateInput.remove(); 27 dateInput.remove();
28 </script> 28 </script>
29 </body> 29 </body>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698