blob: 06a3fd50d6462667393e291b1890f5ea8c072099 [file] [log] [blame]
Test setting valid and invalid properties of HTMLProgressElement.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test values before properties were set
PASS p.value is 0
PASS p.max is 1
PASS p.position is -1
Set valid values
PASS p.value is 70
PASS p.max is 100
PASS p.position is 0.7
Set value bigger than max
PASS p.value is 100
PASS p.max is 100
PASS p.position is 1
Set value less than zero
PASS p.value is 0
PASS p.position is 0
Set invalid value, should throw
PASS p.value = "200A"; threw exception Error: NotSupportedError: DOM Exception 9.
Set invalid max, should throw
PASS p.max = "max"; threw exception Error: NotSupportedError: DOM Exception 9.
Set max to Infinity, should throw
PASS p.max = Infinity; threw exception Error: NotSupportedError: DOM Exception 9.
Set value to NaN, should throw
PASS p.value = NaN; threw exception Error: NotSupportedError: DOM Exception 9.
Set value to null and max to 0
PASS p.value is 0
PASS p.max is 1
PASS p.position is 0
Set attributes to valid numbers
PASS p.value is 5
PASS p.max is 10
PASS parseInt(p.getAttribute('value')) is 5
PASS parseInt(p.getAttribute('max')) is 10
Set attributes to invalid values
PASS p.value is 0
PASS p.max is 1
PASS p.getAttribute('value') is 'ABC'
PASS p.getAttribute('max') is '#'
Set value and max to numbers with leading spaces
PASS p.value is 0
PASS p.max is 1
PASS p.position is 0
PASS successfullyParsed is true
TEST COMPLETE