This commit is contained in:
Boris Zbarsky 2008-07-24 15:28:12 -07:00
Родитель fc25a9101d
Коммит 263e833671
1 изменённых файлов: 52 добавлений и 2 удалений

Просмотреть файл

@ -276,11 +276,61 @@ for each (let n in [1, 2, 3]) {
is(g.defaultChecked, n == 1 && (group1.indexOf(g) == 0 ||
group1.indexOf(g) == 2),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] defaultChecked wrong pass 11");
"] defaultChecked wrong pass 12");
is(g.checked, n == 1 && (group1.indexOf(g) == 1 ||
group1.indexOf(g) == 0),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] checked wrong pass 11");
"] checked wrong pass 12");
}
}
next = group2[1].nextSibling;
p = group2[1].parentNode;
p.removeChild(group2[1]);
p.insertBefore(group2[1], next);
group2[0].checked = true;
for each (let n in [1, 2, 3]) {
for each (let g in window["group"+n]) {
is(g.defaultChecked, n == 1 && (group1.indexOf(g) == 0 ||
group1.indexOf(g) == 2),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] defaultChecked wrong pass 13");
is(g.checked, (n == 1 && (group1.indexOf(g) == 1 ||
group1.indexOf(g) == 0)) ||
(n == 2 && group2.indexOf(g) == 0),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] checked wrong pass 13");
}
}
p.insertBefore(group2[1], next);
for each (let n in [1, 2, 3]) {
for each (let g in window["group"+n]) {
is(g.defaultChecked, n == 1 && (group1.indexOf(g) == 0 ||
group1.indexOf(g) == 2),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] defaultChecked wrong pass 14");
is(g.checked, (n == 1 && (group1.indexOf(g) == 1 ||
group1.indexOf(g) == 0)) ||
(n == 2 && group2.indexOf(g) == 0),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] checked wrong pass 14");
}
}
group2[1].defaultChecked = true;
for each (let n in [1, 2, 3]) {
for each (let g in window["group"+n]) {
is(g.defaultChecked, (n == 1 && (group1.indexOf(g) == 0 ||
group1.indexOf(g) == 2)) ||
(n == 2 && group2.indexOf(g) == 1),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] defaultChecked wrong pass 15");
is(g.checked, (n == 1 && (group1.indexOf(g) == 1 ||
group1.indexOf(g) == 0)) ||
(n == 2 && group2.indexOf(g) == 0),
"group" + n + "[" + window["group"+n].indexOf(g) +
"] checked wrong pass 15");
}
}