function checkOptimum(aElement, aValue, aOptimum, expectedResult)
{ var errorString = expectedResult
? "value attribute should be in the optimum region"
: "value attribute should not be in the optimum region";
function checkSubOptimum(aElement, aValue, aOptimum, expectedResult)
{ var errorString = "value attribute should be in the suboptimal region";
if (!expectedResult) {
errorString = "value attribute should not be in the suboptimal region";
}
aElement.setAttribute('value', aValue);
aElement.setAttribute('optimum', aOptimum);
is(aElement.matches(":-moz-meter-sub-optimum"),
expectedResult, errorString);
}
function checkSubSubOptimum(aElement, aValue, aOptimum, expectedResult)
{ var errorString = "value attribute should be in the sub-suboptimal region";
if (!expectedResult) {
errorString = "value attribute should not be in the sub-suboptimal region";
}
aElement.setAttribute('value', aValue);
aElement.setAttribute('optimum', aOptimum);
is(aElement.matches(":-moz-meter-sub-sub-optimum"),
expectedResult, errorString);
}
function checkMozMatchesSelector()
{ var element = document.createElement('meter');
// all tests realised with default values for min and max (0 and 1)
// low = 0.3 and high = 0.7
element.setAttribute('low', 0.3);
element.setAttribute('high', 0.7);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.