blob: bf198ed5361c72ad4117824e6501183ace8d683b [file] [log] [blame]
Check stepUp() and stepDown() bahevior for type=date.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Invalid value
PASS stepUp("", null, null) threw exception Error: InvalidStateError: DOM Exception 11.
PASS stepDown("", null, null) threw exception Error: InvalidStateError: DOM Exception 11.
Non-number arguments
PASS stepUp("2010-02-10", null, null, "0") is "2010-02-10"
PASS stepDown("2010-02-10", null, null, "0") is "2010-02-10"
PASS stepUp("2010-02-10", null, null, "foo") is "2010-02-10"
PASS stepDown("2010-02-10", null, null, "foo") is "2010-02-10"
PASS stepUp("2010-02-10", null, null, null) is "2010-02-10"
PASS stepDown("2010-02-10", null, null, null) is "2010-02-10"
Normal cases
PASS stepUp("2010-02-10", null, null) is "2010-02-11"
PASS stepDown("2010-02-10", null, null) is "2010-02-09"
PASS stepUp("2010-02-10", null, null, 10) is "2010-02-20"
PASS stepDown("2010-02-10", null, null, 11) is "2010-01-30"
PASS stepUp("1970-01-01", "4", null, 2) is "1970-01-09"
PASS stepDown("1970-01-01", "4", null, 3) is "1969-12-20"
Step=any
PASS stepUp("2010-02-10", "any", null) threw exception Error: InvalidStateError: DOM Exception 11.
PASS stepDown("2010-02-10", "any", null) threw exception Error: InvalidStateError: DOM Exception 11.
Overflow/underflow
PASS stepUp("2010-02-10", "3.40282346e+38", null) threw exception Error: InvalidStateError: DOM Exception 11.
PASS stepDown("2010-02-10", "3.40282346e+38", null) threw exception Error: InvalidStateError: DOM Exception 11.
PASS stepUp("2010-02-10", "1", "2010-02-10") threw exception Error: InvalidStateError: DOM Exception 11.
PASS stepDown("2010-02-10", "1", "2010-02-10") threw exception Error: InvalidStateError: DOM Exception 11.
PASS successfullyParsed is true
TEST COMPLETE