blob: 180523ff4fdc5ee22ec4138ca1da6ab58f9af4b5 [file] [log] [blame]
Check stepMismatch results for type=range.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Empty values
PASS stepMismatchFor("", null, null) is false
PASS stepMismatchFor("", "1.0", "0.1") is false
Integers
PASS stepMismatchFor("1", "2", "0") is false
PASS stepMismatchFor("-3", "2", "-4") is false
PASS input.max = "5"; stepMismatchFor("5", "3", "0") is false
PASS input.value is "3"
Invalid step values
PASS stepMismatchFor("-3", "-2", "-4") is false
PASS stepMismatchFor("-3", null, "-4") is false
PASS stepMismatchFor("-3", undefined, "-4") is false
Updating step attribute
PASS input.value is "50"
PASS input.step = "15"; input.value is "45"
PASS input.step = "20"; input.value is "40"
PASS input.value = "5", input.value is "10"
PASS input.step = "6"; input.value is "12"
Huge numbers and small step; uncomparable
PASS stepMismatchFor("3.40282347e+38", "3", "") is false
PASS stepMismatchFor("3.40282346e+38", "3", "") is false
PASS stepMismatchFor("3.40282345e+38", "3", "") is false
Huge numbers and huge step
PASS stepMismatchFor("3.20e+38", "0.20e+38", "") is false
PASS stepMismatchFor("3.20e+38", "0.22e+38", "") is false
Fractional numbers
PASS stepMismatchFor("0.9", "0.1", "") is false
PASS stepMismatchFor("0.9", "0.1000001", "") is false
PASS stepMismatchFor("0.9", "0.1000000000000001", "") is false
PASS stepMismatchFor("1.0", "0.3333333333333333", "") is false
Disabled
PASS stepMismatchFor("1", "2", "0", true) is false
PASS successfullyParsed is true
TEST COMPLETE