blob: c255a9db46b8a031be6a8815c8f0eeabf48e9707 [file] [log] [blame]
Check stepUp() and stepDown() bahevior for type=datetime.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Invalid value
PASS stepUp("", null, null) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
PASS stepDown("", null, null) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
Non-number arguments
PASS stepUp("2010-02-10T20:13Z", null, null, "0") is "2010-02-10T20:13Z"
PASS stepDown("2010-02-10T20:13Z", null, null, "0") is "2010-02-10T20:13Z"
PASS stepUp("2010-02-10T20:13Z", null, null, "foo") is "2010-02-10T20:13Z"
PASS stepDown("2010-02-10T20:13Z", null, null, "foo") is "2010-02-10T20:13Z"
PASS stepUp("2010-02-10T20:13Z", null, null, null) is "2010-02-10T20:13Z"
PASS stepDown("2010-02-10T20:13Z", null, null, null) is "2010-02-10T20:13Z"
Normal cases
PASS stepUp("2010-02-10T20:13Z", null, null) is "2010-02-10T20:14Z"
PASS stepDown("2010-02-10T20:13Z", null, null) is "2010-02-10T20:12Z"
PASS stepUp("2010-02-10T20:13Z", null, null, 10) is "2010-02-10T20:23Z"
PASS stepDown("2010-02-10T20:13Z", null, null, 11) is "2010-02-10T20:02Z"
PASS stepUp("1970-01-01T20:13Z", "4", null, 2) is "1970-01-01T20:13:08Z"
PASS stepDown("1970-01-01T20:13Z", "4", null, 3) is "1970-01-01T20:12:48Z"
Step=any
PASS stepUp("2010-02-10T20:13Z", "any", null) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
PASS stepDown("2010-02-10T20:13Z", "any", null) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
Overflow/underflow
PASS stepUp("2010-02-10T20:13Z", "3.40282346e+38", null) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
PASS stepDown("2010-02-10T20:13Z", "3.40282346e+38", null) threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
PASS stepUp("2010-02-10T20:13Z", "1", "2010-02-10T20:13Z") threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
PASS stepDown("2010-02-10T20:13Z", "1", "2010-02-10T20:13Z") threw exception InvalidStateError (DOM Exception 11): The object is in an invalid state..
PASS successfullyParsed is true
TEST COMPLETE