OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <script src="../../../../../fast/js/resources/js-test-pre.js"></script> | 4 <script src="../../../../../fast/js/resources/js-test-pre.js"></script> |
5 <script src="../../../../../fast/forms/resources/picker-common.js"></script> | 5 <script src="../../../../../fast/forms/resources/picker-common.js"></script> |
6 <script src="resources/calendar-picker-common.js"></script> | 6 <script src="resources/calendar-picker-common.js"></script> |
7 </head> | 7 </head> |
8 <body> | 8 <body> |
9 <p id="description"></p> | 9 <p id="description"></p> |
10 <div id="console"></div> | 10 <div id="console"></div> |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 // Test twice in case midnight. | 99 // Test twice in case midnight. |
100 shouldBeTrue('testToday() || testToday()'); | 100 shouldBeTrue('testToday() || testToday()'); |
101 | 101 |
102 debug('Check if tabbing works.'); | 102 debug('Check if tabbing works.'); |
103 shouldBe('focusedElement()', '".days-area-container"'); | 103 shouldBe('focusedElement()', '".days-area-container"'); |
104 eventSender.keyDown('\t'); | 104 eventSender.keyDown('\t'); |
105 shouldBe('focusedElement()', '".today-button[value=<<CalendarToday>>]"'); | 105 shouldBe('focusedElement()', '".today-button[value=<<CalendarToday>>]"'); |
106 eventSender.keyDown('\t'); | 106 eventSender.keyDown('\t'); |
107 shouldBe('focusedElement()', '".clear-button[value=<<CalendarClear>>]"'); | 107 shouldBe('focusedElement()', '".clear-button[value=<<CalendarClear>>]"'); |
108 eventSender.keyDown('\t'); | 108 eventSender.keyDown('\t'); |
109 shouldBe('focusedElement()', '".year-month-button[value=<<]"'); | 109 shouldBe('focusedElement()', '".year-month-button"'); |
110 eventSender.keyDown('\t', ['shiftKey']); | 110 eventSender.keyDown('\t', ['shiftKey']); |
111 shouldBe('focusedElement()', '".clear-button[value=<<CalendarClear>>]"'); | 111 shouldBe('focusedElement()', '".clear-button[value=<<CalendarClear>>]"'); |
112 | 112 |
113 eventSender.keyDown('\x1B'); | 113 eventSender.keyDown('\x1B'); |
114 shouldBeNull('document.getElementById("mock-page-popup")'); | 114 shouldBeNull('document.getElementById("mock-page-popup")'); |
115 shouldBe('document.getElementById("date").value', '"1999-12-26"'); | 115 shouldBe('document.getElementById("date").value', '"1999-12-26"'); |
116 | 116 |
117 sendKey(document.getElementById('date'), "F4"); | 117 sendKey(document.getElementById('date'), "F4"); |
118 if (document.getElementById('mock-page-popup')) | 118 if (document.getElementById('mock-page-popup')) |
119 testPassed("F4 opened picker."); | 119 testPassed("F4 opened picker."); |
(...skipping 23 matching lines...) Expand all Loading... |
143 var identifier = "." + element.className; | 143 var identifier = "." + element.className; |
144 if (element.value) | 144 if (element.value) |
145 identifier += "[value=" + element.value + "]"; | 145 identifier += "[value=" + element.value + "]"; |
146 return identifier; | 146 return identifier; |
147 } | 147 } |
148 | 148 |
149 </script> | 149 </script> |
150 <script src="../../../../../fast/js/resources/js-test-post.js"></script> | 150 <script src="../../../../../fast/js/resources/js-test-post.js"></script> |
151 </body> | 151 </body> |
152 </html> | 152 </html> |
OLD | NEW |