A few more tests
This commit is contained in:
Родитель
fc25a9101d
Коммит
263e833671
|
@ -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");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче