| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <script src="../../../resources/js-test.js"></script> | 4 <script src="../../../resources/js-test.js"></script> |
| 5 <script src="../../forms/resources/picker-common.js"></script> | 5 <script src="../../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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 | 153 |
| 154 debug("press shift + d"); | 154 debug("press shift + d"); |
| 155 eventSender.keyDown('D'); | 155 eventSender.keyDown('D'); |
| 156 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); | 156 shouldBeTrue('isCalendarTableScrollingWithAnimation()'); |
| 157 shouldBeEqualToString('currentMonth()', '1999-12'); | 157 shouldBeEqualToString('currentMonth()', '1999-12'); |
| 158 shouldBeEqualToString('selectedValue()', '2000-01-02'); | 158 shouldBeEqualToString('selectedValue()', '2000-01-02'); |
| 159 shouldBeEqualToString('selectedDayCells()', ''); | 159 shouldBeEqualToString('selectedDayCells()', ''); |
| 160 shouldBeEqualToString('highlightedValue()', '1999-12-26'); | 160 shouldBeEqualToString('highlightedValue()', '1999-12-26'); |
| 161 shouldBeEqualToString('highlightedDayCells()', '1999-12-26'); | 161 shouldBeEqualToString('highlightedDayCells()', '1999-12-26'); |
| 162 | 162 |
| 163 debug("press enter"); | |
| 164 removeCommitDelay(); | |
| 165 eventSender.keyDown('Enter'); | |
| 166 shouldBeEqualToString('document.getElementById("date").value', '1999-12-26')
; | |
| 167 waitUntilClosing(function() { | |
| 168 openPicker(document.getElementById("date"), test2); | |
| 169 }); | |
| 170 } | |
| 171 | |
| 172 function test2() { | |
| 173 debug('Check if tabbing works.'); | 163 debug('Check if tabbing works.'); |
| 174 shouldBeEqualToString('focusedElement()', '.list-view calendar-table-view'); | 164 shouldBeEqualToString('focusedElement()', '.list-view calendar-table-view'); |
| 175 eventSender.keyDown('Tab', ['shiftKey']); | 165 eventSender.keyDown('Tab', ['shiftKey']); |
| 176 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); | 166 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); |
| 177 eventSender.keyDown('Tab', ['shiftKey']); | 167 eventSender.keyDown('Tab', ['shiftKey']); |
| 178 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button today
-button'); | 168 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button today
-button'); |
| 179 eventSender.keyDown('Tab', ['shiftKey']); | 169 eventSender.keyDown('Tab', ['shiftKey']); |
| 180 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); | 170 shouldBeEqualToString('focusedElement()', '.calendar-navigation-button'); |
| 181 eventSender.keyDown('Tab', ['shiftKey']); | 171 eventSender.keyDown('Tab', ['shiftKey']); |
| 182 shouldBeEqualToString('focusedElement()', '.month-popup-button'); | 172 shouldBeEqualToString('focusedElement()', '.month-popup-button'); |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 shouldBeEqualToString('highlightedMonthButton()', '2001-04'); | 222 shouldBeEqualToString('highlightedMonthButton()', '2001-04'); |
| 233 | 223 |
| 234 debug("press PageUp"); | 224 debug("press PageUp"); |
| 235 eventSender.keyDown('PageUp'); | 225 eventSender.keyDown('PageUp'); |
| 236 shouldBeEqualToString('highlightedMonthButton()', '2000-04'); | 226 shouldBeEqualToString('highlightedMonthButton()', '2000-04'); |
| 237 | 227 |
| 238 debug('select month in the month popup'); | 228 debug('select month in the month popup'); |
| 239 eventSender.keyDown('Enter'); | 229 eventSender.keyDown('Enter'); |
| 240 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); | 230 shouldBeFalse('popupWindow.global.picker.monthPopupView.isVisible'); |
| 241 shouldBeEqualToString('currentMonth()', '2000-04'); | 231 shouldBeEqualToString('currentMonth()', '2000-04'); |
| 242 shouldBeEqualToString('selectedValue()', '1999-12-26'); | 232 shouldBeEqualToString('selectedValue()', '2000-01-02'); |
| 243 shouldBeEqualToString('selectedDayCells()', ''); | 233 shouldBeEqualToString('selectedDayCells()', ''); |
| 244 shouldBeEqualToString('highlightedValue()', '1999-12-26'); | 234 shouldBeEqualToString('highlightedValue()', '1999-12-26'); |
| 245 shouldBeEqualToString('highlightedDayCells()', ''); | 235 shouldBeEqualToString('highlightedDayCells()', ''); |
| 246 | 236 |
| 247 debug("focus calendar table"); | 237 debug("focus calendar table"); |
| 248 popupWindow.global.picker.calendarTableView.element.focus(); | 238 popupWindow.global.picker.calendarTableView.element.focus(); |
| 249 | 239 |
| 250 setNoCloseOnCommit(); | 240 setNoCloseOnCommit(); |
| 251 // Test twice in case midnight. | 241 // Test twice in case midnight. |
| 252 debug("press t"); | 242 debug("press t"); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 if (element.className) | 290 if (element.className) |
| 301 identifier += "." + element.className.replace(/ +/g, "."); | 291 identifier += "." + element.className.replace(/ +/g, "."); |
| 302 if (element.value) | 292 if (element.value) |
| 303 identifier += "[value=" + element.value + "]"; | 293 identifier += "[value=" + element.value + "]"; |
| 304 return identifier; | 294 return identifier; |
| 305 } | 295 } |
| 306 | 296 |
| 307 </script> | 297 </script> |
| 308 </body> | 298 </body> |
| 309 </html> | 299 </html> |
| OLD | NEW |