blob: b356ee8c387688656d8ea17cc414461d3892bbef [file] [log] [blame]
Test setting valid and invalid properties of HTMLMeterElement.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
Test values before properties were set
PASS m.min is 0
PASS m.value is 0
PASS m.max is 1
PASS m.low is 0
PASS m.high is 1
PASS m.optimum is 0.5
Set valid values
PASS m.min is -10
PASS m.value is 70
PASS m.max is 100
PASS m.low is 10.1
PASS m.high is 99.5
PASS m.optimum is 70
Set attributes to improper values - 1
PASS m.min is -10
PASS m.value is 100
PASS m.max is 100
PASS m.low is 100
PASS m.high is 100
PASS m.optimum is 0
Set attributes to improper values - 2
PASS m.min is 200.0
PASS m.value is 200.0
PASS m.max is 200.0
PASS m.low is 200.0
Set attributes to improper values - 3
PASS m.min is 100.0
PASS m.value is 100.0
PASS m.max is 100.0
PASS m.low is 100.0
PASS m.high is 100.0
PASS m.optimum is 100.0
Set attributes to improper values - 4
PASS m.min is 0.0
PASS m.value is 200.0
PASS m.max is 200.0
PASS m.low is 0.0
PASS m.high is 200.0
PASS m.optimum is 12.5
Set value to invalid value
PASS m.value = "value"; threw exception Error: NotSupportedError: DOM Exception 9.
Set min to NaN
PASS m.min = NaN; threw exception Error: NotSupportedError: DOM Exception 9.
Set max to Infinity
PASS m.max = Infinity; threw exception Error: NotSupportedError: DOM Exception 9.
Set low to invalid value
PASS m.low = "low"; threw exception Error: NotSupportedError: DOM Exception 9.
Set high to NaN
PASS m.high = NaN; threw exception Error: NotSupportedError: DOM Exception 9.
Set optimum to Infinity
PASS m.optimum = Infinity; threw exception Error: NotSupportedError: DOM Exception 9.
Set attributes to valid numbers
PASS m.value is 5
PASS m.max is 10
PASS parseInt(m.getAttribute('value')) is 5
PASS parseInt(m.getAttribute('max')) is 10
Set attributes to invalid values
PASS m.value is 0
PASS m.max is 1
PASS m.getAttribute('value') is 'ABC'
PASS m.getAttribute('max') is '#'
Set attributes to numbers with leading spaces
PASS m.value is 0
PASS m.min is 0
PASS m.max is 1
PASS m.low is 0
PASS m.high is 1
PASS m.optimum is 0.5
PASS successfullyParsed is true
TEST COMPLETE