function checkRadioGroup(aFrame, aResults)
{ var radios = frames[aFrame].document.getElementsByTagName('input');
is(radios.length, aResults.length, "Radio group should have " + aResults.length + "elements");
for (var i=0; i<aResults.length; ++i) {
is(radios[i].checked, aResults[i], "Radio checked state should be " + aResults[i]);
}
}
SimpleTest.waitForExplicitFinish();
addLoadEvent(function() {
/**
* We have two iframes each containing one radio button group.
* We are going to change the selected radio button in one group.
* Then, both iframes will be reloaded and the new groups will have another
* radio checked by default.
* For the first group (which had a selection change), nothing should change.
* For the second, the selected radio button should change.
*/
checkRadioGroup(0, [true, false, false]);
checkRadioGroup(1, [true, false, false]);
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.