diff --git a/content/html/content/test/test_bug418756.html b/content/html/content/test/test_bug418756.html index 56f15def43e..ed51300956b 100644 --- a/content/html/content/test/test_bug418756.html +++ b/content/html/content/test/test_bug418756.html @@ -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"); } }