-Check stepUp() and stepDown() bahevior for type=week.
+Check stepUp() and stepDown() behavior for type=week.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Invalid value
-PASS stepUp("", null, null) threw exception InvalidStateError: Failed to execute 'stepUp' on 'HTMLInputElement': The form element's current value is not a number..
-PASS stepDown("", null, null) threw exception InvalidStateError: Failed to execute 'stepDown' on 'HTMLInputElement': The form element's current value is not a number..
+PASS stepUp("", null, null) is "1970-W02"
+PASS stepDown("", null, null) is "1970-W01"
Non-number arguments
PASS stepUp("2010-W02", null, null, "0") is "2010-W02"
PASS stepDown("2010-W02", null, null, "0") is "2010-W02"
PASS stepUp("2010-W02", "any", null) threw exception InvalidStateError: Failed to execute 'stepUp' on 'HTMLInputElement': This form element does not have an allowed value step..
PASS stepDown("2010-W02", "any", null) threw exception InvalidStateError: Failed to execute 'stepDown' on 'HTMLInputElement': This form element does not have an allowed value step..
Overflow/underflow
-PASS stepUp("2010-W02", "3.40282346e+38", null) threw exception InvalidStateError: Failed to execute 'stepUp' on 'HTMLInputElement': The form element's new value (2.058027628608e+47) would be higher than the maximum (8639999568000000), and snapping to the maximum would exceed the amount of acceptible error..
-PASS stepDown("2010-W02", "3.40282346e+38", null) threw exception InvalidStateError: Failed to execute 'stepDown' on 'HTMLInputElement': The form element's new value (-2.058027628608e+47) would be lower than the minimum (-62135596800000), and snapping to the minimum would exceed the amount of acceptible error..
-PASS stepUp("2010-W02", "1", "2010-W02") threw exception InvalidStateError: Failed to execute 'stepUp' on 'HTMLInputElement': The form element's new value (1263772800000) would be higher than the maximum (1263168000000), and snapping to the maximum would exceed the amount of acceptible error..
-PASS stepDown("2010-W02", "1", "2010-W02") threw exception InvalidStateError: Failed to execute 'stepDown' on 'HTMLInputElement': The form element's new value (1262563200000) would be lower than the minimum (1263168000000), and snapping to the minimum would exceed the amount of acceptible error..
+PASS stepUp("2010-W02", "3.40282346e+38", null) is "275760-W37"
+PASS stepDown("2010-W02", "3.40282346e+38", null) is "1970-W01"
+PASS stepUp("2010-W02", "1", "2010-W02") is "2010-W02"
+PASS stepDown("2010-W02", "1", "2010-W02") is "2010-W02"
PASS successfullyParsed is true