Meter Element

Summary

Harness status: OK

Found 50 tests

Details

ResultTest NameMessage
PassDefault values
Asserts run
Pass
assert_equals(0, 0, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(0, 0, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(1, 1, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(0, 0, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(1, 1, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(0.5, 0.5, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
PassSetting values to min, max, low, high and optimum
Asserts run
Pass
assert_equals(3, 3, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(-10.1, -10.1, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(10.1, 10.1, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(-9.1, -9.1, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(9.1, 9.1, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(3, 3, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passmax < min
Asserts run
Pass
assert_equals(0, 0, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(0, 0, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(0, 0, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(0, 0, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(0, 0, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(0, 0, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passvalue < min
Asserts run
Pass
assert_equals(10, 10, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(10, 10, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(20, 20, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(15, 15, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passvalue > max
Asserts run
Pass
assert_equals(20, 20, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(10, 10, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(20, 20, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(15, 15, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passlow < min
Asserts run
Pass
assert_equals(15, 15, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(10, 10, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(20, 20, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(15, 15, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passlow > max
Asserts run
Pass
assert_equals(15, 15, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(20, 20, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(20, 20, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(15, 15, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passhigh < low
Asserts run
Pass
assert_equals(15, 15, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(12, 12, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(12, 12, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(15, 15, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passhigh > max
Asserts run
Pass
assert_equals(15, 15, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(10, 10, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(20, 20, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(15, 15, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passoptimum < min
Asserts run
Pass
assert_equals(15, 15, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(10, 10, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(20, 20, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(10, 10, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
Passoptimum > max
Asserts run
Pass
assert_equals(15, 15, "meter value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:65:11)
Pass
assert_equals(10, 10, "min value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:66:11)
Pass
assert_equals(20, 20, "max value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:67:11)
Pass
assert_equals(10, 10, "low value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:68:11)
Pass
assert_equals(20, 20, "high value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:69:11)
Pass
assert_equals(20, 20, "optimum value")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:70:11)
PassInvalid floating-point number values
Asserts run
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() { meter.value = "foobar"; }", "value attribute")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:75:11)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() { meter.min = "foobar"; }", "min attribute")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:76:11)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() { meter.max = "foobar"; }", "max attribute")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:77:11)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() { meter.low = "foobar"; }", "low attribute")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:78:11)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() { meter.high = "foobar"; }", "high attribute")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:79:11)
Pass
assert_throws_js(function "function TypeError() { [native code] }", function "function() { meter.optimum = "foobar"; }", "optimum attribute")
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:80:11)
Passvalue must be 0 when a string is given
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:86:11)
Passdefault value of min is 0
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:90:11)
PassIf min is not specified and value is smaller than the default value of min (i.e. 0), the actual value must be 0
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:94:11)
Passdefault value of max is 1.0
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:98:11)
PassIf max is not specified and value is larger than the default value of max (i.e. 1.0), the actual value must be 1.0
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:102:11)
PassIf a value smaller than 1.0 is given to min and max is not specified, max must be the same value as its default value (i.e. 1.0)
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:106:11)
PassIf a value smaller than 1.0 is given to min, max is not specified, and value is larger than the default value of max (i.e. 1.0), the actual value must be 1.0
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:110:11)
PassIf a value larger than or equal to 1.0 is given to min and max is not specified, max must be the same value as min
Asserts run
Pass
assert_equals(12.1, 12.1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:114:11)
PassIf a value larger than or equal to 1.0 is given to min and max is not specified, the actual value must be the same value as min
Asserts run
Pass
assert_equals(12.1, 12.1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:118:11)
PassIf a value smaller than 0 is given to max and min is not specified, min must be be the same value as its default value (i.e. 0)
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:122:11)
PassIf a value smaller than 0 is given to max and min is not specified, max must be be the same value as the default value of min (i.e. 0)
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:126:11)
PassIf a value smaller than 0 is given to max and min is not specified, the actual value must be be the same value as the default value of min (i.e. 0)
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:130:11)
PassIf a value larger than or equal to 0 is given to max and min is not specified, max must be the same value as the default value of min (i.e. 0)
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:134:11)
PassIf a value larger than or equal to 0 is given to max and min is not specified, min must be the same value as its default value (i.e. 0)
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:138:11)
PassIf a value larger than or equal to 0 is given to max and min is not specified, the actual value must be the same value as the default value of min (i.e. 0)
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:142:11)
Passmin must be 0 when a string is given
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:146:11)
PassIf a string is given to min and value is smaller than the default value of min (i.e. 0), the actual value must be 0
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:150:11)
Passmax must be 1.0 when a string is given
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:154:11)
PassIf a string is given to max and value is larger than the default value of min (i.e. 1.0), the actual value must be 1.0
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:158:11)
Passgiving a string to low must not affect the actual value
Asserts run
Pass
assert_equals(-10.3, -10.3)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:162:11)
Passhigh must equal max when a string is given to high
Asserts run
Pass
assert_equals(1.5, 1.5)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:166:11)
Passgiving a string to high must not affect the actual value
Asserts run
Pass
assert_equals(1.5, 1.5)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:170:11)
Passvalue must not be smaller than min
Asserts run
Pass
assert_equals(4.5, 4.5)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:174:11)
Passvalue must not be larger than max
Asserts run
Pass
assert_equals(52.02, 52.02)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:178:11)
Passdefault low and high values equal min and max, respectively
Asserts run
Pass
assert_array_equals([-12.3, 3.4], [-12.3, 3.4])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:183:11)
Passdefault low and high values equal 0 and 1.0 respectively, if both low and high are not specified
Asserts run
Pass
assert_array_equals([0, 1], [0, 1])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:188:11)
Passlow must not be smaller than min
Asserts run
Pass
assert_array_equals([12.3, 12.3, 12.3], [12.3, 12.3, 12.3])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:193:11)
Passlow must not be larger than max
Asserts run
Pass
assert_array_equals([-34.5, -34.5, -34.5], [-34.5, -34.5, -34.5])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:198:11)
Passhigh must not be smaller than min
Asserts run
Pass
assert_array_equals([12.3, 12.3, 12.3], [12.3, 12.3, 12.3])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:203:11)
Passhigh must not be larger than max
Asserts run
Pass
assert_array_equals([-34.5, -34.5, -34.5], [-34.5, -34.5, -34.5])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:208:11)
PassIf min is not specified, low must not be smaller than default value of min (i.e. 0)
Asserts run
Pass
assert_array_equals([0, 0, 0], [0, 0, 0])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:213:11)
PassIf a value smaller than low is given to high, it must be set to the same value as low
Asserts run
Pass
assert_array_equals([-10.3, -10.3, -9], [-10.3, -10.3, -9])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:218:11)
PassIf max is not specified, high must not be larger than default value of max (i.e. 1.0)
Asserts run
Pass
assert_array_equals([1, 1], [1, 1])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:223:11)
Passoptimum smaller than min
Asserts run
Pass
assert_equals(0, 0)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:227:11)
Passoptimum (smaller than min) must not affect min and the actual value
Asserts run
Pass
assert_array_equals([0, 0], [0, 0])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:232:11)
Passoptimum smaller than max
Asserts run
Pass
assert_equals(1, 1)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:236:11)
Passoptimum (larger than max) must not affect max and the actual value
Asserts run
Pass
assert_array_equals([1, 1], [1, 1])
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:241:11)
Passdefault optimum value is the midpoint between min and max
Asserts run
Pass
assert_equals(-49.463499999999996, -49.463499999999996)
    at Test.<anonymous> ( /html/semantics/forms/the-meter-element/meter.html:246:11)